KArchive 5.109.0
|
A KZipFileEntry represents a file in a zip archive. More...
#include <KZipFileEntry>
Public Member Functions | |
KZipFileEntry (KZip *zip, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink, const QString &path, qint64 start, qint64 uncompressedSize, int encoding, qint64 compressedSize) | |
Creates a new zip file entry. | |
~KZipFileEntry () override | |
Destructor. | |
qint64 | compressedSize () const |
unsigned long | crc32 () const |
CRC: only used when writing. | |
QIODevice * | createDevice () const override |
This method returns a QIODevice to read the file contents. | |
QByteArray | data () const override |
int | encoding () const |
qint64 | headerStart () const |
const QString & | path () const |
Name with complete path - KArchiveFile::name() is the filename only (no path) | |
void | setCompressedSize (qint64 compressedSize) |
Only used when writing. | |
void | setCRC32 (unsigned long crc32) |
void | setHeaderStart (qint64 headerstart) |
Header start: only used when writing. | |
![]() | |
KArchiveFile (KArchive *archive, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink, qint64 pos, qint64 size) | |
Creates a new file entry. | |
~KArchiveFile () override | |
Destructor. | |
bool | copyTo (const QString &dest) const |
Extracts the file to the directory dest . | |
virtual QIODevice * | createDevice () const |
This method returns QIODevice (internal class: KLimitedIODevice) on top of the underlying QIODevice. | |
virtual QByteArray | data () const |
Returns the data of the file. | |
bool | isFile () const override |
Checks whether this entry is a file. | |
qint64 | position () const |
Position of the data in the [uncompressed] archive. | |
void | setSize (qint64 s) |
Set size of data, usually after writing the file. | |
qint64 | size () const |
Size of the data. | |
![]() | |
KArchiveEntry (KArchive *archive, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink) | |
Creates a new entry. | |
QDateTime | date () const |
Creation date of the file. | |
QString | group () const |
Group of the user who created the file. | |
virtual bool | isDirectory () const |
Checks whether the entry is a directory. | |
virtual bool | isFile () const |
Checks whether the entry is a file. | |
QString | name () const |
Name of the file without path. | |
mode_t | permissions () const |
The permissions and mode flags as returned by the stat() function in st_mode. | |
QString | symLinkTarget () const |
Symlink if there is one. | |
QString | user () const |
User who created the file. | |
Additional Inherited Members | |
![]() | |
void | virtual_hook (int id, void *data) override |
![]() | |
KArchive * | archive () const |
virtual void | virtual_hook (int id, void *data) |
A KZipFileEntry represents a file in a zip archive.
KZipFileEntry::KZipFileEntry | ( | KZip * | zip, |
const QString & | name, | ||
int | access, | ||
const QDateTime & | date, | ||
const QString & | user, | ||
const QString & | group, | ||
const QString & | symlink, | ||
const QString & | path, | ||
qint64 | start, | ||
qint64 | uncompressedSize, | ||
int | encoding, | ||
qint64 | compressedSize | ||
) |
Creates a new zip file entry.
Do not call this, KZip takes care of it.
|
override |
Destructor.
Do not call this.
unsigned long KZipFileEntry::crc32 | ( | ) | const |
CRC: only used when writing.
|
overridevirtual |
This method returns a QIODevice to read the file contents.
This is obviously for reading only. Note that the ownership of the device is being transferred to the caller, who will have to delete it. The returned device auto-opens (in readonly mode), no need to open it.
Reimplemented from KArchiveFile.
|
overridevirtual |
Reimplemented from KArchiveFile.
const QString & KZipFileEntry::path | ( | ) | const |
Name with complete path - KArchiveFile::name() is the filename only (no path)
void KZipFileEntry::setCompressedSize | ( | qint64 | compressedSize | ) |
Only used when writing.
void KZipFileEntry::setHeaderStart | ( | qint64 | headerstart | ) |
Header start: only used when writing.