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

KFileSize KFileInfo::size (  ) const

The file size, taking into account multiple links for plain files or the true allocated size for sparse files. For plain files with multiple links this will be size/no_links, for sparse files it is the number of bytes actually allocated.

Definition at line 218 of file kfileinfo.cpp.

References allocatedSize().

Referenced by KDirStat::KDirInfo::childAdded(), KDirStat::KDirTreeViewItem::compare(), KDirStat::KDirTreeViewItem::init(), KFileInfo(), KDirStat::KDirTreeView::popupContextMenu(), totalSize(), and KDirStat::KCacheWriter::writeItem().

{
    KFileSize sz = _isSparseFile ? allocatedSize() : _size;

    if ( _links > 1 )
      sz /= _links;

    return sz;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index