#include <kdirsize.h>
Inherits Job.
Public Member Functions | |
KIO::filesize_t | totalSize () const |
KIO::filesize_t | totalFiles () const |
KIO::filesize_t | totalSubdirs () const |
Static Public Member Functions | |
static KDirSize * | dirSizeJob (const KURL &directory) |
static KDirSize * | dirSizeJob (const KFileItemList &lstItems) |
static KIO::filesize_t | dirSize (const KURL &directory) |
Protected Slots | |
virtual void | slotResult (KIO::Job *job) |
void | slotEntries (KIO::Job *, const KIO::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)
Member Function Documentation
KIO::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.
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.
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.
KIO::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.
KIO::filesize_t KDirSize::totalSize | ( | ) | const [inline] |
- Returns:
- the size we found
Definition at line 42 of file kdirsize.h.
KIO::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.
The documentation for this class was generated from the following files: