KDECore
karchive.h
Go to the documentation of this file.
virtual void virtual_hook(int id, void *data)
Definition karchive.cpp:880
const KArchiveEntry * entry(const QString &name) const
Returns the entry with the given name.
Definition karchive.cpp:721
KArchiveDirectory(KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink)
Creates a new directory entry.
Definition karchive.cpp:702
void copyTo(const QString &dest, bool recursive=true) const
Extracts all entries in this archive directory to the directory dest.
Definition karchive.cpp:800
virtual bool isDirectory() const
Checks whether this entry is a directory.
Definition karchive.cpp:791
mode_t permissions() const
The permissions and mode flags as returned by the stat() function in st_mode.
Definition karchive.cpp:556
KArchiveEntry(KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink)
Creates a new entry.
Definition karchive.cpp:527
virtual QIODevice * createDevice() const
This method returns QIODevice (internal class: KLimitedIODevice) on top of the underlying QIODevice.
Definition karchive.cpp:652
void copyTo(const QString &dest) const
Extracts the file to the directory dest.
Definition karchive.cpp:662
qint64 position() const
Position of the data in the [uncompressed] archive.
Definition karchive.cpp:620
KArchiveFile(KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink, qint64 pos, qint64 size)
Creates a new file entry.
Definition karchive.cpp:606
virtual bool createDevice(QIODevice::OpenMode mode)
Can be reimplemented in order to change the creation of the device (when using the fileName construct...
Definition karchive.cpp:131
bool addLocalFile(const QString &fileName, const QString &destName)
Writes a local file into the archive.
Definition karchive.cpp:205
virtual KArchiveDirectory * rootDir()
Retrieves or create the root directory.
Definition karchive.cpp:391
virtual bool doWriteDir(const QString &name, const QString &user, const QString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime)=0
Write a directory to the archive.
KArchive(const QString &fileName)
Base constructor (protected since this is a pure virtual class).
Definition karchive.cpp:81
virtual bool open(QIODevice::OpenMode mode)
Opens the archive for reading or writing.
Definition karchive.cpp:104
const KArchiveDirectory * directory() const
If an archive is opened for reading, then the contents of the archive can be accessed via this functi...
Definition karchive.cpp:198
virtual bool openArchive(QIODevice::OpenMode mode)=0
Opens an archive for reading or writing.
virtual bool doWriteSymLink(const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime)=0
Writes a symbolic link to the archive.
KArchiveDirectory * findOrCreate(const QString &path)
Ensures that path exists, create otherwise.
Definition karchive.cpp:406
bool addLocalDirectory(const QString &path, const QString &destName)
Writes a local directory into the archive, including all its contents, recursively.
Definition karchive.cpp:293
QIODevice::OpenMode mode() const
Returns the mode in which the archive was opened.
Definition karchive.cpp:470
virtual bool doPrepareWriting(const QString &name, const QString &user, const QString &group, qint64 size, mode_t perm, time_t atime, time_t mtime, time_t ctime)=0
This virtual method must be implemented by subclasses.
QString fileName() const
The name of the archive file, as passed to the constructor that takes a fileName, or an empty string ...
Definition karchive.cpp:485
void setRootDir(KArchiveDirectory *rootDir)
Derived classes call setRootDir from openArchive, to set the root directory after parsing an existing...
Definition karchive.cpp:464
void setDevice(QIODevice *dev)
Can be called by derived classes in order to set the underlying device.
Definition karchive.cpp:456
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.