org.kde.koala
public class KZip extends KArchive
UNKNOWN: A class for reading/writing zip archives.
Field Summary | |
---|---|
static int | DefaultExtraField |
static int | DeflateCompression |
static int | ModificationTime |
static int | NoCompression
Describes the compression type for a given file in the Zip archive. |
static int | NoExtraField
Describes the contents of the "extra field" for a given file in the Zip archive. |
Constructor Summary | |
---|---|
protected | KZip(Class dummy) |
KZip(String filename)
Creates an instance that operates on the given filename.
using the compression filter associated to given mimetype. | |
KZip(QIODeviceInterface dev)
Creates an instance that operates on the given device.
|
Method Summary | |
---|---|
protected boolean | closeArchive() |
int | compression()
The current compression mode that will be used for new files. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
boolean | doneWriting(int size)
Write data to a file that has been created using prepareWriting(). |
int | extraField()
The current type of "extra field" that will be used for new files. |
String | fileName()
The name of the zip file, as passed to the constructor.
|
protected void | finalize() Deletes the wrapped C++ instance |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
protected boolean | openArchive(int mode)
Opens the archive for reading.
|
boolean | prepareWriting(String name, String user, String group, int size)
Alternative method for writing: call prepareWriting(), then feed the data
in small chunks using writeData(), and call doneWriting() when done. |
boolean | prepareWriting(String name, String user, String group, int size, long perm, int atime, int mtime, int ctime) |
protected boolean | prepareWriting_impl(String name, String user, String group, int size, long perm, int atime, int mtime, int ctime) |
void | setCompression(int c)
Call this before writeFile or prepareWriting, to define whether the next
files to be written should be compressed or not. |
void | setExtraField(int ef)
Call this before writeFile or prepareWriting, to define what the next
file to be written should have in its extra field. |
boolean | writeData(String data, int size)
Write data to a file that has been created using prepareWriting(). |
protected boolean | writeData_impl(String data, int size) |
boolean | writeDir(String name, String user, String group) |
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) |
boolean | writeSymLink(String name, String target, String user, String group, long perm, int atime, int mtime, int ctime) |
protected boolean | writeSymLink_impl(String name, String target, String user, String group, long perm, int atime, int mtime, int ctime) |
UNKNOWN: Describes the compression type for a given file in the Zip archive.
UNKNOWN: Describes the contents of the "extra field" for a given file in the Zip archive.
Parameters: filename is a local path (e.g. "/home/holger/myfile.zip")
UNKNOWN: Creates an instance that operates on the given filename.
Parameters: dev the device to access
UNKNOWN: Do not assume that giving a QFile here will decompress the file, in case it's compressed! Creates an instance that operates on the given device.
Returns: the current compression mode
See Also: KZip
UNKNOWN: The current compression mode that will be used for new files.
Parameters: size the size of the file
Returns: true if successful, false otherwise
UNKNOWN: Write data to a file that has been created using prepareWriting().
Returns: the current type of "extra field"
See Also: KZip
UNKNOWN: The current type of "extra field" that will be used for new files.
Returns: the zip's file name, or null if a QIODevice is used
UNKNOWN: The name of the zip file, as passed to the constructor.
Parameters: mode the mode of the file
UNKNOWN: Opens the archive for reading.
Parameters: name can include subdirs e.g. path/to/the/file user the user owning the file group the group owning the file size unused argument
Returns: true if successful, false otherwise
UNKNOWN: Alternative method for writing: call prepareWriting(), then feed the data in small chunks using writeData(), and call doneWriting() when done.
Parameters: c the new compression mode
See Also: KZip
UNKNOWN: Call this before writeFile or prepareWriting, to define whether the next files to be written should be compressed or not.
Parameters: ef the type of "extra field"
See Also: KZip
UNKNOWN: Call this before writeFile or prepareWriting, to define what the next file to be written should have in its extra field.
Parameters: data a pointer to the data size the size of the chunk
Returns: true if successful, false otherwise
UNKNOWN: Write data to a file that has been created using prepareWriting().
UNKNOWN: for virtual_hook @short @internal for virtual_hook
UNKNOWN:
Parameters: name can include subdirs e.g. path/to/the/file user the user owning the file group the group owning the file size the size of the file data a pointer to the data
Returns: true if successful, false otherwise
UNKNOWN: If an archive is opened for writing then you can add a new file using this function.