KArchiveEntry Class

Base class for the archive-file's directory structure. More...

Header: #include <KArchiveEntry>
CMake: find_package(KF6 REQUIRED COMPONENTS Archive)
target_link_libraries(mytarget PRIVATE KF6::Archive)
Inherited By:

KArchiveDirectory and KArchiveFile

Public Functions

KArchiveEntry(KArchive *archive, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink)
QDateTime date() const
QString group() const
virtual bool isDirectory() const
virtual bool isFile() const
QString name() const
mode_t permissions() const
QString symLinkTarget() const
QString user() const

Detailed Description

See also KArchiveFile and KArchiveDirectory.

Member Function Documentation

KArchiveEntry::KArchiveEntry(KArchive *archive, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink)

Creates a new entry.

archive the entries archive

name the name of the entry

access the permissions in unix format

date the date (in seconds since 1970)

user the user that owns the entry

group the group that owns the entry

symlink the symlink, or QString()

QDateTime KArchiveEntry::date() const

Creation date of the file.

Returns the creation date

QString KArchiveEntry::group() const

Group of the user who created the file.

Returns the group of the file

[virtual] bool KArchiveEntry::isDirectory() const

Checks whether the entry is a directory.

Returns true if this entry is a directory

[virtual] bool KArchiveEntry::isFile() const

Checks whether the entry is a file.

Returns true if this entry is a file

QString KArchiveEntry::name() const

Name of the file without path.

Returns the file name without path

mode_t KArchiveEntry::permissions() const

The permissions and mode flags as returned by the stat() function in st_mode.

Returns the permissions

QString KArchiveEntry::symLinkTarget() const

Symlink if there is one.

Returns the symlink, or QString()

QString KArchiveEntry::user() const

User who created the file.

Returns the owner of the file