\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=300pt]{classKDirSize__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
KIO::filesize\_\-t {\bf total\-Size} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KDir\-Size} $\ast$ {\bf dir\-Size\-Job} (const  {\bf KURL} \&directory)
\begin{CompactList}\small\item\em Asynchronous method. \item\end{CompactList}\item 
{\bf KDir\-Size} $\ast$ {\bf dir\-Size\-Job} (const  {\bf KFile\-Item\-List} \&lst\-Items)
\begin{CompactList}\small\item\em Asynchronous method. \item\end{CompactList}\item 
KIO::filesize\_\-t {\bf dir\-Size} (const  {\bf KURL} \&directory)
\begin{CompactList}\small\item\em Synchronous method - you get the result as soon as the call returns. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Result} ({\bf KIO::Job} $\ast$job)
\begin{CompactList}\small\item\em Called whenever a subjob finishes. \item\end{CompactList}\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}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}!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 112 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 118 of file kdirsize.cpp.\index{KDirSize@{KDir\-Size}!dirSize@{dirSize}}
\index{dirSize@{dirSize}!KDirSize@{KDir\-Size}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}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 124 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 {\bf remove\-Subjob}{\rm (p.\,\pageref{classKIO_1_1Job_b2})}. Override if you don't want subjobs errors to be propagated. 

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

Definition at line 133 of file kdirsize.cpp.

References QPtr\-List::count(), QPtr\-List::is\-Empty(), QPtr\-List$<$ Job $>$::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}
