org.kde.koala
public class KArchive extends Object implements QtSupport
UNKNOWN: generic class for reading/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(Class dummy) |
Method Summary | |
---|---|
boolean | addLocalDirectory(String path, String destName)
Writes a local directory into the archive, including all its contents, recursively.
|
boolean | addLocalFile(String fileName, String destName)
Writes a local file into the archive. |
void | close()
Closes the archive.
|
boolean | closeSucceeded()
Use to check if close had any problem |
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(String name, String user, 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(String name, String user, 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(String data, int size)
Write data into the current file - to be called after calling prepareWriting |
boolean | writeDir(String name, String user, String group)
If an archive is opened for writing then you can add new directories
using this function. |
boolean | writeDir(String name, String user, 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(String name, String user, String group, int size, String data)
If an archive is opened for writing then you can add a new file
using this function. |
boolean | writeFile(String name, String user, String group, int size, long perm, int atime, int mtime, int ctime, String data)
If an archive is opened for writing then you can add a new file
using this function. |
boolean | writeSymLink(String name, String target, String user, 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. |
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.Parameters: 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.
UNKNOWN: Writes a local directory into the archive, including all its contents, recursively.
fileName
is a symbolic link, it will be written as is, i. e.
it will not be resolved before.Parameters: 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.
UNKNOWN: Writes a local file into the archive.
See Also: KArchive
UNKNOWN: Closes the archive.
Returns: true if close succeded without problems
UNKNOWN: Use to check if close had any problem
Returns: the underlying device.
UNKNOWN: The underlying device.
Returns: the directory of the archive
UNKNOWN: If an archive is opened for reading, then the contents of the archive can be accessed via this function.
Parameters: size the size of the file
See Also: KArchive
UNKNOWN: Call doneWriting after writing the data.
Returns: true if the archive is opened
UNKNOWN: Checks whether the archive is open.
Returns: the mode in which the archive was opened (IO_ReadOnly or IO_WriteOnly)
See Also: KArchive
UNKNOWN: Returns the mode in which the archive was opened
Parameters: mode may be IO_ReadOnly or IO_WriteOnly
See Also: KArchive
UNKNOWN: Opens the archive for reading or writing.
Parameters: name the name of the file user the user that owns the file group the group that owns the file size the size of the file
UNKNOWN: TODO(BIC): make this a thin non-wrapper around prepareWriting(name,user,group,size,perm,atime,mtime,ctime) or eliminate it. 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 ).
Parameters: name the name of the file user the user that owns the file group the group that owns the file size the size of the file perm permissions of the file atime time the file was last accessed mtime modification time of the file ctime creation time of the file
UNKNOWN: 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 ).
UNKNOWN: TODO(BIC) make virtual. For now virtual_hook allows reimplementing it. Write data into the current file - to be called after calling prepareWriting @todo TODO(BIC) make virtual.
Parameters: name the name of the directory user the user that owns the directory group the group that owns the directory
UNKNOWN: TODO(BIC): make this a thin wrapper around writeDir(name,user,group,perm,atime,mtime,ctime) or eliminate it If an archive is opened for writing then you can add new directories using this function.
Parameters: name the name of the directory user the user that owns the directory group the group that owns the directory perm permissions of the directory atime time the file was last accessed mtime modification time of the file ctime creation time of the file
UNKNOWN: If an archive is opened for writing then you can add new directories using this function.
Parameters: name the name of the file user the user that owns the file group the group that owns the file size the size of the file data the data to write (size
bytes)
UNKNOWN: TODO(BIC): make this a thin non-wrapper around writeFile(name,user,group,size,perm,atime,mtime,ctime,data) If an archive is opened for writing then you can add a new file using this function.
Parameters: name the name of the file user the user that owns the file group the group that owns the file size the size of the file perm permissions of the file atime time the file was last accessed mtime modification time of the file ctime creation time of the file data the data to write (size
bytes)
UNKNOWN: If an archive is opened for writing then you can add a new file using this function.
Parameters: name name of symbolic link target target of symbolic link user the user that owns the directory group the group that owns the directory perm permissions of the directory atime time the file was last accessed mtime modification time of the file ctime creation time of the file
UNKNOWN: Writes a symbolic link to the archive if the archive must be opened for writing.