• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KDirSize Class Reference

#include <kdirsize.h>

Inherits TDEIO::Job.

Public Member Functions

TDEIO::filesize_t totalSize () const
 
TDEIO::filesize_t totalFiles () const
 
TDEIO::filesize_t totalSubdirs () const
 

Static Public Member Functions

static KDirSize * dirSizeJob (const KURL &directory)
 
static KDirSize * dirSizeJob (const KFileItemList &lstItems)
 
static TDEIO::filesize_t dirSize (const KURL &directory)
 

Protected Slots

virtual void slotResult (TDEIO::Job *job)
 
void slotEntries (TDEIO::Job *, const TDEIO::UDSEntryList &)
 
void processList ()
 

Protected Member Functions

 KDirSize (const KURL &directory)
 
 KDirSize (const KFileItemList &lstItems)
 
void setSync ()
 
void startNextJob (const KURL &url)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

Computes a directory size (similar to "du", but doesn't give the same results since we simply sum up the dir and file sizes, whereas du speaks disk blocks)

Definition at line 30 of file kdirsize.h.

Constructor & Destructor Documentation

◆ KDirSize() [1/2]

KDirSize::KDirSize ( const KURL &  directory)
protected

Definition at line 29 of file kdirsize.cpp.

◆ KDirSize() [2/2]

KDirSize::KDirSize ( const KFileItemList &  lstItems)
protected

Definition at line 35 of file kdirsize.cpp.

◆ ~KDirSize()

KDirSize::~KDirSize ( )
inlineprotected

Definition at line 36 of file kdirsize.h.

Member Function Documentation

◆ dirSize()

TDEIO::filesize_t KDirSize::dirSize ( const KURL &  directory)
static

Synchronous method - you get the result as soon as the call returns.

Definition at line 138 of file kdirsize.cpp.

◆ dirSizeJob() [1/2]

KDirSize * KDirSize::dirSizeJob ( const KFileItemList &  lstItems)
static

Asynchronous method.

Connect to the result signal. This one lists the items from lstItems. The reason we asks for items instead of just urls, is so that we directly know if the item is a file or a directory, and in case of a file, we already have its size.

Definition at line 132 of file kdirsize.cpp.

◆ dirSizeJob() [2/2]

KDirSize * KDirSize::dirSizeJob ( const KURL &  directory)
static

Asynchronous method.

Connect to the result signal. This one lists a single directory.

Definition at line 126 of file kdirsize.cpp.

◆ processList

void KDirSize::processList ( )
protectedslot

Definition at line 41 of file kdirsize.cpp.

◆ setSync()

void KDirSize::setSync ( )
inlineprotected

Definition at line 84 of file kdirsize.h.

◆ slotEntries

void KDirSize::slotEntries ( TDEIO::Job *  ,
const TDEIO::UDSEntryList &  list 
)
protectedslot

Definition at line 80 of file kdirsize.cpp.

◆ slotResult

void KDirSize::slotResult ( TDEIO::Job *  job)
protectedvirtualslot

Definition at line 147 of file kdirsize.cpp.

◆ startNextJob()

void KDirSize::startNextJob ( const KURL &  url)
protected

Definition at line 70 of file kdirsize.cpp.

◆ totalFiles()

TDEIO::filesize_t KDirSize::totalFiles ( ) const
inline
Returns
the total number of files (counting symlinks to files, sockets and character devices as files) in this directory and all sub-directories
Since
3.3

Definition at line 49 of file kdirsize.h.

◆ totalSize()

TDEIO::filesize_t KDirSize::totalSize ( ) const
inline
Returns
the size we found

Definition at line 42 of file kdirsize.h.

◆ totalSubdirs()

TDEIO::filesize_t KDirSize::totalSubdirs ( ) const
inline
Returns
the total number of sub-directories found (not including the directory the search started from and treating symlinks to directories as directories)
Since
3.3

Definition at line 57 of file kdirsize.h.

◆ virtual_hook()

void KDirSize::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 163 of file kdirsize.cpp.


The documentation for this class was generated from the following files:
  • kdirsize.h
  • kdirsize.cpp

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.