\section{KDir\-Size Class Reference}
\label{classKDirSize}\index{KDirSize@{KDirSize}}
Computes a directory size (similar to \char`\"{}du\char`\"{}, but doesn't give the same results since we simply sum up the dir and file sizes, whereas du speaks disk blocks).  


{\tt \#include $<$kdirsize.h$>$}

Inheritance diagram for KDir\-Size:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=45pt]{classKDirSize__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KDir\-Size:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=110pt]{classKDirSize__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KIO::filesize\_\-t} {\bf total\-Size} () const 
\item 
{\bf KIO::filesize\_\-t} {\bf total\-Files} () const 
\item 
{\bf KIO::filesize\_\-t} {\bf total\-Subdirs} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KDir\-Size} $\ast$ {\bf dir\-Size\-Job} (const {\bf KURL} \&directory)
\item 
static {\bf KDir\-Size} $\ast$ {\bf dir\-Size\-Job} (const {\bf KFile\-Item\-List} \&lst\-Items)
\item 
static {\bf KIO::filesize\_\-t} {\bf dir\-Size} (const {\bf KURL} \&directory)
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Result} ({\bf KIO::Job} $\ast$job)
\item 
void {\bf slot\-Entries} ({\bf KIO::Job} $\ast$, const {\bf KIO::UDSEntry\-List} \&)\label{classKDirSize_j1}

\item 
void {\bf process\-List} ()\label{classKDirSize_j2}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KDir\-Size} (const {\bf KURL} \&directory)\label{classKDirSize_b0}

\item 
{\bf KDir\-Size} (const {\bf KFile\-Item\-List} \&lst\-Items)\label{classKDirSize_b1}

\item 
void {\bf set\-Sync} ()\label{classKDirSize_b3}

\item 
void {\bf start\-Next\-Job} (const {\bf KURL} \&url)\label{classKDirSize_b4}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKDirSize_b5}

\end{CompactItemize}


\subsection{Detailed Description}
Computes a directory size (similar to \char`\"{}du\char`\"{}, 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.

\subsection{Member Function Documentation}
\index{KDirSize@{KDir\-Size}!totalSize@{totalSize}}
\index{totalSize@{totalSize}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KDir\-Size::total\-Size () const\hspace{0.3cm}{\tt  [inline]}}\label{classKDirSize_a0}


\begin{Desc}
\item[Returns:]the size we found \end{Desc}


Definition at line 42 of file kdirsize.h.

Referenced by dir\-Size().\index{KDirSize@{KDir\-Size}!totalFiles@{totalFiles}}
\index{totalFiles@{totalFiles}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KDir\-Size::total\-Files () const\hspace{0.3cm}{\tt  [inline]}}\label{classKDirSize_a1}


\begin{Desc}
\item[Returns:]the total number of files (counting symlinks to files, sockets and character devices as files) in this directory and all sub-directories \end{Desc}
\begin{Desc}
\item[Since:]3.3 \end{Desc}


Definition at line 49 of file kdirsize.h.\index{KDirSize@{KDir\-Size}!totalSubdirs@{totalSubdirs}}
\index{totalSubdirs@{totalSubdirs}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KDir\-Size::total\-Subdirs () const\hspace{0.3cm}{\tt  [inline]}}\label{classKDirSize_a2}


\begin{Desc}
\item[Returns:]the total number of sub-directories found (not including the directory the search started from and treating symlinks to directories as directories) \end{Desc}
\begin{Desc}
\item[Since:]3.3 \end{Desc}


Definition at line 57 of file kdirsize.h.\index{KDirSize@{KDir\-Size}!dirSizeJob@{dirSizeJob}}
\index{dirSizeJob@{dirSizeJob}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KDir\-Size} $\ast$ KDir\-Size::dir\-Size\-Job (const {\bf KURL} \& {\em directory})\hspace{0.3cm}{\tt  [static]}}\label{classKDirSize_e0}


Asynchronous method. 

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

Definition at line 126 of file kdirsize.cpp.

Referenced by dir\-Size().\index{KDirSize@{KDir\-Size}!dirSizeJob@{dirSizeJob}}
\index{dirSizeJob@{dirSizeJob}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KDir\-Size} $\ast$ KDir\-Size::dir\-Size\-Job (const {\bf KFile\-Item\-List} \& {\em lst\-Items})\hspace{0.3cm}{\tt  [static]}}\label{classKDirSize_e1}


Asynchronous method. 

Connect to the result signal. This one lists the items from {\tt lst\-Items}. 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.\index{KDirSize@{KDir\-Size}!dirSize@{dirSize}}
\index{dirSize@{dirSize}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KDir\-Size::dir\-Size (const {\bf KURL} \& {\em directory})\hspace{0.3cm}{\tt  [static]}}\label{classKDirSize_e2}


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



Definition at line 138 of file kdirsize.cpp.

References dir\-Size(), dir\-Size\-Job(), set\-Sync(), and total\-Size().

Referenced by dir\-Size().\index{KDirSize@{KDir\-Size}!slotResult@{slotResult}}
\index{slotResult@{slotResult}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KDir\-Size::slot\-Result ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKDirSize_j0}


Called whenever a subjob finishes. 

Default implementation checks for errors and propagates to parent job, then calls remove\-Subjob. Override if you don't want subjobs errors to be propagated. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em job}]the subjob \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf result()}{\rm (p.\,\pageref{classKIO_1_1Job_l0})} \end{Desc}


Reimplemented from {\bf KIO::Job} {\rm (p.\,\pageref{classKIO_1_1Job_j0})}.

Definition at line 147 of file kdirsize.cpp.

References QPtr\-List::count(), endl(), QPtr\-List::is\-Empty(), kd\-Debug(), QPtr\-List::remove(), and KIO::Job::slot\-Result().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kdirsize.h\item 
kdirsize.cpp\end{CompactItemize}
