Logo Search packages:      
Sourcecode: k4dirstat version File versions  Download package

Public Member Functions | Protected Attributes

KDirStat::KFileInfo Class Reference

Basic file information (like obtained by the lstat() sys call) More...

#include <kfileinfo.h>

Inheritance diagram for KDirStat::KFileInfo:
Inheritance graph
[legend]
Collaboration diagram for KDirStat::KFileInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

KFileSize allocatedSize () const
KFileSize blocks () const
KFileSize blockSize () const
KFileSize byteSize () const
virtual void childAdded (KFileInfo *newChild)
QString debugUrl () const
virtual void deletingChild (KFileInfo *deletedChild)
dev_t device () const
virtual KFileInfodotEntry () const
virtual KFileInfofirstChild () const
virtual bool hasChildren () const
virtual void insertChild (KFileInfo *newChild)
bool isBlockDevice () const
virtual bool isBusy ()
bool isCharDevice () const
bool isDevice () const
bool isDir () const
virtual bool isDirInfo () const
virtual bool isDotEntry () const
virtual bool isExcluded () const
bool isFifo () const
bool isFile () const
virtual bool isFinished ()
bool isInSubtree (const KFileInfo *subtree) const
bool isLocalFile () const
virtual bool isMountPoint ()
bool isSocket () const
bool isSparseFile () const
bool isSpecial () const
bool isSymLink () const
 KFileInfo (const QString &filenameWithoutPath, struct stat *statInfo, KDirTree *tree, KDirInfo *parent=0)
 KFileInfo (KDirTree *tree, KDirInfo *parent, const QString &filenameWithoutPath, mode_t mode, KFileSize size, time_t mtime, KFileSize blocks=-1, nlink_t links=1)
 KFileInfo (const KFileItem *fileItem, KDirTree *tree, KDirInfo *parent=0)
 KFileInfo (KDirTree *tree, KDirInfo *parent=0, const char *name=0)
virtual time_t latestMtime ()
nlink_t links () const
virtual KFileInfolocate (QString url, bool findDotEntries=false)
mode_t mode () const
time_t mtime () const
QString name () const
KFileInfonext () const
KDirInfoparent () const
virtual int pendingReadJobs ()
virtual KDirReadState readState () const
virtual void setDotEntry (KFileInfo *newDotEntry)
virtual void setExcluded (bool excl)
virtual void setFirstChild (KFileInfo *newFirstChild)
virtual void setMountPoint (bool isMountPoint=true)
void setNext (KFileInfo *newNext)
void setParent (KDirInfo *newParent)
KFileSize size () const
virtual KFileSize totalBlocks ()
virtual int totalFiles ()
virtual int totalItems ()
virtual KFileSize totalSize ()
virtual int totalSubDirs ()
KDirTreetree () const
int treeLevel () const
virtual void unlinkChild (KFileInfo *deletedChild)
QString url () const
QString urlPart (int level) const
virtual ~KFileInfo ()

Protected Attributes

KFileSize _blocks
dev_t _device
bool _isLocalFile:1
bool _isSparseFile:1
nlink_t _links
mode_t _mode
time_t _mtime
QString _name
KFileInfo_next
KDirInfo_parent
KFileSize _size
KDirTree_tree

Detailed Description

Basic file information (like obtained by the lstat() sys call)

The most basic building block of a KDirTree:

Information about one single directory entry. This is the type of info typically obtained by stat() / lstat() or similar calls. Most of this can also be obtained by KIO::KDirListJob, but not all: The device this file resides on is something none of KIO's many classes will tell (since of course this only makes sense for local files) - yet this had been _the_ single most requested feature of KDirStat <1.0: Stay on one filesystem. To facilitate this, information about the device is required, thus we'll do lstat() sys calls ourselves for local files. This is what the classes in this file are all about.

This class is tuned for size rather than speed: A typical Linux system easily has 150,000+ file system objects, and at least one entry of this sort is required for each of them.

This class provides stubs for children management, yet those stubs all are default implementations that don't really deal with children. Derived classes need to take care of that.

Definition at line 88 of file kfileinfo.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index