|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.kde.koala.KArchive
public class KArchive
KArchive is a base class for reading and writing archives.
| Field Summary | |
|---|---|
static int |
VIRTUAL_PREPARE_WRITING
|
static int |
VIRTUAL_WRITE_DATA
|
static int |
VIRTUAL_WRITE_DIR
|
static int |
VIRTUAL_WRITE_FILE
|
static int |
VIRTUAL_WRITE_SYMLINK
|
| Constructor Summary | |
|---|---|
protected |
KArchive(java.lang.Class dummy)
|
| Method Summary | |
|---|---|
boolean |
addLocalDirectory(java.lang.String path,
java.lang.String destName)
Writes a local directory into the archive, including all its contents, recursively. |
boolean |
addLocalFile(java.lang.String fileName,
java.lang.String destName)
Writes a local file into the archive. |
void |
close()
Closes the archive. |
boolean |
closeSucceeded()
Use to check if close had any problem |
org.kde.qt.QIODeviceInterface |
device()
The underlying device. |
KArchiveDirectory |
directory()
If an archive is opened for reading, then the contents of the archive can be accessed via this function. |
boolean |
doneWriting(int size)
Call doneWriting after writing the data. |
boolean |
isOpened()
Checks whether the archive is open. |
int |
mode()
Returns the mode in which the archive was opened |
boolean |
open(int mode)
Opens the archive for reading or writing. |
boolean |
prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size)
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as many times as wanted then call doneWriting( totalSize ). |
boolean |
prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime)
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as many times as wanted then call doneWriting( totalSize ). |
boolean |
writeData(java.lang.String data,
int size)
Write data into the current file - to be called after calling prepareWriting |
boolean |
writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group)
If an archive is opened for writing then you can add new directories using this function. |
boolean |
writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
If an archive is opened for writing then you can add new directories using this function. |
boolean |
writeFile(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime,
java.lang.String data)
If an archive is opened for writing then you can add a new file using this function. |
boolean |
writeFile(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
java.lang.String data)
If an archive is opened for writing then you can add a new file using this function. |
boolean |
writeSymLink(java.lang.String name,
java.lang.String target,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
Writes a symbolic link to the archive if the archive must be opened for writing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VIRTUAL_WRITE_DATA
public static final int VIRTUAL_WRITE_SYMLINK
public static final int VIRTUAL_WRITE_DIR
public static final int VIRTUAL_WRITE_FILE
public static final int VIRTUAL_PREPARE_WRITING
| Constructor Detail |
|---|
protected KArchive(java.lang.Class dummy)
| Method Detail |
|---|
public boolean open(int mode)
mode - may be IO_ReadOnly or IO_WriteOnlyclose()public void close()
open(int)public boolean closeSucceeded()
public boolean isOpened()
public int mode()
open(int)public org.kde.qt.QIODeviceInterface device()
public KArchiveDirectory directory()
public boolean addLocalFile(java.lang.String fileName,
java.lang.String destName)
fileName is a symbolic link, it will be written as is, i. e.
it will not be resolved before.
fileName - full path to an existing local file, to be added to the archive.destName - the resulting name (or relative path) of the file in the archive.
public boolean addLocalDirectory(java.lang.String path,
java.lang.String destName)
path that is a symbolic link to a
directory. The symbolic link will be dereferenced and the content of the
directory it is pointing to added recursively. However, symbolic links
under path will be stored as is.
path - full path to an existing local directory, to be added to the archive.destName - the resulting name (or relative path) of the file in the archive.
public boolean writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group)
name - the name of the directoryuser - the user that owns the directorygroup - the group that owns the directory
public boolean writeDir(java.lang.String name,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
name - the name of the directoryuser - the user that owns the directorygroup - the group that owns the directoryperm - permissions of the directoryatime - time the file was last accessedmtime - modification time of the filectime - creation time of the file
public boolean writeSymLink(java.lang.String name,
java.lang.String target,
java.lang.String user,
java.lang.String group,
long perm,
int atime,
int mtime,
int ctime)
name - name of symbolic linktarget - target of symbolic linkuser - the user that owns the directorygroup - the group that owns the directoryperm - permissions of the directoryatime - time the file was last accessedmtime - modification time of the filectime - creation time of the file
public boolean writeFile(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
java.lang.String data)
name - the name of the fileuser - the user that owns the filegroup - the group that owns the filesize - the size of the filedata - the data to write (size bytes)
public boolean writeFile(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime,
java.lang.String data)
name - the name of the fileuser - the user that owns the filegroup - the group that owns the filesize - the size of the fileperm - permissions of the fileatime - time the file was last accessedmtime - modification time of the filectime - creation time of the filedata - the data to write (size bytes)
public boolean prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size)
name - the name of the fileuser - the user that owns the filegroup - the group that owns the filesize - the size of the file
public boolean prepareWriting(java.lang.String name,
java.lang.String user,
java.lang.String group,
int size,
long perm,
int atime,
int mtime,
int ctime)
name - the name of the fileuser - the user that owns the filegroup - the group that owns the filesize - the size of the fileperm - permissions of the fileatime - time the file was last accessedmtime - modification time of the filectime - creation time of the file
public boolean writeData(java.lang.String data,
int size)
public boolean doneWriting(int size)
size - the size of the fileprepareWriting(java.lang.String, java.lang.String, java.lang.String, int)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||