KArchive 5.109.0
Public Member Functions | Protected Member Functions | List of all members
KArchiveEntry

A base class for entries in an KArchive. More...

#include <KArchiveEntry>

Public Member Functions

 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.
 

Protected Member Functions

KArchivearchive () const
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

A base class for entries in an KArchive.

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

See also
KArchiveFile
KArchiveDirectory

Constructor & Destructor Documentation

◆ KArchiveEntry()

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.

Parameters
archivethe entries archive
namethe name of the entry
accessthe permissions in unix format
datethe date (in seconds since 1970)
userthe user that owns the entry
groupthe group that owns the entry
symlinkthe symlink, or QString()

Member Function Documentation

◆ date()

QDateTime KArchiveEntry::date ( ) const

Creation date of the file.

Returns
the creation date

◆ group()

QString KArchiveEntry::group ( ) const

Group of the user who created the file.

Returns
the group of the file

◆ isDirectory()

virtual bool KArchiveEntry::isDirectory ( ) const
virtual

Checks whether the entry is a directory.

Returns
true if this entry is a directory

Reimplemented in KArchiveDirectory.

◆ isFile()

virtual bool KArchiveEntry::isFile ( ) const
virtual

Checks whether the entry is a file.

Returns
true if this entry is a file

Reimplemented in KArchiveFile.

◆ name()

QString KArchiveEntry::name ( ) const

Name of the file without path.

Returns
the file name without path

◆ permissions()

mode_t KArchiveEntry::permissions ( ) const

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

Returns
the permissions

◆ symLinkTarget()

QString KArchiveEntry::symLinkTarget ( ) const

Symlink if there is one.

Returns
the symlink, or QString()

◆ user()

QString KArchiveEntry::user ( ) const

User who created the file.

Returns
the owner of the file