\section{KDir\-Lister\-Cache Class Reference}
\label{classKDirListerCache}\index{KDirListerCache@{KDirListerCache}}
Design of the cache: There is a single KDir\-Lister\-Cache for the whole process.  


{\tt \#include $<$kdirlister\_\-p.h$>$}

Inheritance diagram for KDir\-Lister\-Cache:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=88pt]{classKDirListerCache__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KDir\-Lister\-Cache:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=232pt]{classKDirListerCache__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KDir\-Lister\-Cache} (int max\-Count=10)\label{classKDirListerCache_a0}

\item 
void {\bf list\-Dir} ({\bf KDir\-Lister} $\ast$lister, const  {\bf KURL} \&\_\-url, bool \_\-keep, bool \_\-reload)\label{classKDirListerCache_a2}

\item 
void {\bf stop} ({\bf KDir\-Lister} $\ast$lister)\label{classKDirListerCache_a3}

\item 
void {\bf stop} ({\bf KDir\-Lister} $\ast$lister, const  {\bf KURL} \&\_\-url)\label{classKDirListerCache_a4}

\item 
void {\bf set\-Auto\-Update} ({\bf KDir\-Lister} $\ast$lister, bool enable)\label{classKDirListerCache_a5}

\item 
void {\bf forget\-Dirs} ({\bf KDir\-Lister} $\ast$lister)\label{classKDirListerCache_a6}

\item 
void {\bf forget\-Dirs} ({\bf KDir\-Lister} $\ast$lister, const  {\bf KURL} \&\_\-url, bool notify)\label{classKDirListerCache_a7}

\item 
void {\bf update\-Directory} (const  {\bf KURL} \&\_\-dir)\label{classKDirListerCache_a8}

\item 
{\bf KFile\-Item\-List} $\ast$ {\bf items\-For\-Dir} (const  {\bf KURL} \&\_\-dir) const \label{classKDirListerCache_a9}

\item 
{\bf KFile\-Item} $\ast$ {\bf find\-By\-Name} (const  {\bf KDir\-Lister} $\ast$lister, const  {\bf QString} \&\_\-name) const \label{classKDirListerCache_a10}

\item 
{\bf KFile\-Item} $\ast$ {\bf find\-By\-URL} (const  {\bf KDir\-Lister} $\ast$lister, const  {\bf KURL} \&\_\-url) const \label{classKDirListerCache_a11}

\item 
virtual void {\bf Files\-Added} (const  {\bf KURL} \&directory)
\begin{CompactList}\small\item\em Notify that files have been added in {\tt directory} The receiver will list that directory again to find the new items (since it needs more than just the names anyway). \item\end{CompactList}\item 
virtual void {\bf Files\-Removed} (const  {\bf KURL::List} \&file\-List)
\begin{CompactList}\small\item\em Notify that files have been deleted. \item\end{CompactList}\item 
virtual void {\bf Files\-Changed} (const  {\bf KURL::List} \&file\-List)
\begin{CompactList}\small\item\em Notify that files have been changed. \item\end{CompactList}\item 
virtual void {\bf File\-Renamed} (const  {\bf KURL} \&src, const  {\bf KURL} \&dst)
\begin{CompactList}\small\item\em Notify that a file has been renamed. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KDir\-Lister\-Cache} $\ast$ {\bf self} ()\label{classKDirListerCache_e0}

\end{CompactItemize}


\subsection{Detailed Description}
Design of the cache: There is a single KDir\-Lister\-Cache for the whole process. 

It holds all the items used by the dir listers (items\-In\-Use) as well as a cache of the recently used items (items\-Cached). Those items are grouped by directory (a Dir\-Item represents a whole directory).

KDir\-Lister\-Cache also runs all the jobs for listing directories, whether they are for normal listing or for updates. For faster lookups, it also stores two dicts: a URL -$>$ dirlister holding that URL (urls\-Currently\-Held) a URL -$>$ dirlister currently listing that URL (urls\-Currently\-Listed) 



Definition at line 123 of file kdirlister\_\-p.h.

\subsection{Member Function Documentation}
\index{KDirListerCache@{KDir\-Lister\-Cache}!FilesAdded@{FilesAdded}}
\index{FilesAdded@{FilesAdded}!KDirListerCache@{KDir\-Lister\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KDir\-Lister\-Cache::Files\-Added (const {\bf KURL} \& {\em directory})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDirListerCache_a12}


Notify that files have been added in {\tt directory} The receiver will list that directory again to find the new items (since it needs more than just the names anyway). 

Reimplemented from {\bf KDir\-Notify}{\rm (p.\,\pageref{classKDirNotify})}. 

Implements {\bf KDir\-Notify} {\rm (p.\,\pageref{classKDirNotify_z0})}.

Definition at line 622 of file kdirlister.cpp.\index{KDirListerCache@{KDir\-Lister\-Cache}!FilesRemoved@{FilesRemoved}}
\index{FilesRemoved@{FilesRemoved}!KDirListerCache@{KDir\-Lister\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KDir\-Lister\-Cache::Files\-Removed (const {\bf KURL::List} \& {\em file\-List})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDirListerCache_a13}


Notify that files have been deleted. 

This call passes the exact urls of the deleted files so that any view showing them can simply remove them or be closed (if its current dir was deleted) Reimplemented from {\bf KDir\-Notify}{\rm (p.\,\pageref{classKDirNotify})}. 

Implements {\bf KDir\-Notify} {\rm (p.\,\pageref{classKDirNotify_z1})}.

Definition at line 627 of file kdirlister.cpp.

References QValue\-List$<$ KURL $>$::begin(), QValue\-List$<$ KURL $>$::Const\-Iterator(), KURL::directory(), KDir\-Lister::emit\-Delete\-Item(), QValue\-List$<$ KURL $>$::end(), QPtr\-List::first(), KFile\-Item::is\-Dir(), QPtr\-List::next(), KURL::set\-Path(), QPtr\-List::take(), KURL::url(), and KFile\-Item::url().\index{KDirListerCache@{KDir\-Lister\-Cache}!FilesChanged@{FilesChanged}}
\index{FilesChanged@{FilesChanged}!KDirListerCache@{KDir\-Lister\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KDir\-Lister\-Cache::Files\-Changed (const {\bf KURL::List} \& {\em file\-List})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDirListerCache_a14}


Notify that files have been changed. 

At the moment, this is only used for new icon, but it could be used for size etc. as well. Note: this is ASYNC so that it can be used with a broadcast 

Implements {\bf KDir\-Notify} {\rm (p.\,\pageref{classKDirNotify_z2})}.

Definition at line 671 of file kdirlister.cpp.

References QValue\-List$<$ KURL $>$::begin(), QValue\-List$<$ KURL $>$::Const\-Iterator(), KURL::directory(), QValue\-List$<$ KURL $>$::end(), QValue\-List$<$ KURL $>$::find(), QValue\-List$<$ KURL $>$::prepend(), KFile\-Item::refresh(), and KURL::set\-Path().\index{KDirListerCache@{KDir\-Lister\-Cache}!FileRenamed@{FileRenamed}}
\index{FileRenamed@{FileRenamed}!KDirListerCache@{KDir\-Lister\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KDir\-Lister\-Cache::File\-Renamed (const {\bf KURL} \& {\em src}, const {\bf KURL} \& {\em dst})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDirListerCache_a15}


Notify that a file has been renamed. 

Note: this is ASYNC so that it can be used with a broadcast 

Reimplemented from {\bf KDir\-Notify} {\rm (p.\,\pageref{classKDirNotify_z3})}.

Definition at line 707 of file kdirlister.cpp.

References KFile\-Item::refresh\-Mime\-Type(), KFile\-Item::set\-URL(), and KURL::url().

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