\section{ost::Dir\-Tree Class Reference} \label{classost_1_1_dir_tree}\index{ost::DirTree@{ost::DirTree}} A generic class to walk a hierarchical directory structure.Directory tree walking. {\tt \#include $<$file.h$>$} \subsection*{Public Member Functions} \begin{CompactItemize} \item {\bf Dir\-Tree} (const char $\ast$prefix, unsigned maxdepth) \begin{CompactList}\small\item\em Construct a directory tree walk starting at the specified prefix. \item\end{CompactList}\item {\bf Dir\-Tree} (unsigned maxdepth) \begin{CompactList}\small\item\em Construct an un-opened directory tree of a known maximum depth. \item\end{CompactList}\item virtual {\bf $\sim$Dir\-Tree} () \item void {\bf open} (const char $\ast$prefix) \begin{CompactList}\small\item\em Open a directory tree path. \item\end{CompactList}\item void {\bf close} (void) \begin{CompactList}\small\item\em Close the directory path. \item\end{CompactList}\item char $\ast$ {\bf get\-Path} (void) \begin{CompactList}\small\item\em Extract the next full pathname from the directory walk. \item\end{CompactList}\item unsigned {\bf perform} (const char $\ast$prefix) \begin{CompactList}\small\item\em This is used to step through the filter virtual for an entire subtree, and is used for cases where a derived {\bf Dir\-Tree}{\rm (p.\,\pageref{classost_1_1_dir_tree})} class performs it's primary operations through filter rather than externally by calling {\bf get\-Path()}{\rm (p.\,\pageref{classost_1_1_dir_tree_0005c2fa80454f86d3c69c0e312b4523})}. \item\end{CompactList}\end{CompactItemize} \subsection*{Protected Member Functions} \begin{CompactItemize} \item virtual bool {\bf filter} (const char $\ast$file, struct stat $\ast$ino) \begin{CompactList}\small\item\em Virtual method to filter results. \item\end{CompactList}\end{CompactItemize} \subsection{Detailed Description} A generic class to walk a hierarchical directory structure.Directory tree walking. \begin{Desc} \item[Author:]David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ost::DirTree@{ost::Dir\-Tree}!DirTree@{DirTree}} \index{DirTree@{DirTree}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Dir\-Tree::Dir\-Tree (const char $\ast$ {\em prefix}, unsigned {\em maxdepth})}\label{classost_1_1_dir_tree_7a88f36f4d26157b5ee8f55f1274c764} Construct a directory tree walk starting at the specified prefix. A maximum subdirectory depth is also specified. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em prefix}]to start walk. \item[{\em maxdepth}]subdirectory depth to examine. \end{description} \end{Desc} \index{ost::DirTree@{ost::Dir\-Tree}!DirTree@{DirTree}} \index{DirTree@{DirTree}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Dir\-Tree::Dir\-Tree (unsigned {\em maxdepth})}\label{classost_1_1_dir_tree_b80493eccf4b5547f2a259783c432992} Construct an un-opened directory tree of a known maximum depth. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em maxdepth}]subdirectory subdirectory depth. \end{description} \end{Desc} \index{ost::DirTree@{ost::Dir\-Tree}!~DirTree@{$\sim$DirTree}} \index{~DirTree@{$\sim$DirTree}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::Dir\-Tree::$\sim$Dir\-Tree ()\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_dir_tree_12a08ba9122fb17f23ae8ff3850aac6a} \subsection{Member Function Documentation} \index{ost::DirTree@{ost::Dir\-Tree}!close@{close}} \index{close@{close}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Dir\-Tree::close (void)}\label{classost_1_1_dir_tree_d3bea5f9b8ef281b2ce95d2b0d7102ee} Close the directory path. \index{ost::DirTree@{ost::Dir\-Tree}!filter@{filter}} \index{filter@{filter}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool ost::Dir\-Tree::filter (const char $\ast$ {\em file}, struct stat $\ast$ {\em ino})\hspace{0.3cm}{\tt [protected, virtual]}}\label{classost_1_1_dir_tree_2950f4634b09423642edaa10fbfed51f} Virtual method to filter results. Virtual override methods should call baseclass method to assure . and .. names are stripped out. \begin{Desc} \item[Returns:]true if current filename is accepted. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em file}]path to examine \item[{\em ino}]info of type, date, etc. \end{description} \end{Desc} \index{ost::DirTree@{ost::Dir\-Tree}!getPath@{getPath}} \index{getPath@{getPath}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Dir\-Tree::get\-Path (void)}\label{classost_1_1_dir_tree_0005c2fa80454f86d3c69c0e312b4523} Extract the next full pathname from the directory walk. When returning directories, a '/' is appended. The returned string is a buffer of MAX\_\-PATH size. \begin{Desc} \item[Returns:]path of next subdirectory entry or NULL. \end{Desc} \index{ost::DirTree@{ost::Dir\-Tree}!open@{open}} \index{open@{open}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Dir\-Tree::open (const char $\ast$ {\em prefix})}\label{classost_1_1_dir_tree_d675651afc2bf2f209c342f5b32ee3a5} Open a directory tree path. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em prefix}]directory path to open. \end{description} \end{Desc} \index{ost::DirTree@{ost::Dir\-Tree}!perform@{perform}} \index{perform@{perform}!ost::DirTree@{ost::Dir\-Tree}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned ost::Dir\-Tree::perform (const char $\ast$ {\em prefix})}\label{classost_1_1_dir_tree_d5a805f4ca629255e4c30307b63f1e5d} This is used to step through the filter virtual for an entire subtree, and is used for cases where a derived {\bf Dir\-Tree}{\rm (p.\,\pageref{classost_1_1_dir_tree})} class performs it's primary operations through filter rather than externally by calling {\bf get\-Path()}{\rm (p.\,\pageref{classost_1_1_dir_tree_0005c2fa80454f86d3c69c0e312b4523})}. \begin{Desc} \item[Returns:]number of files and directories examined. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em prefix}]directory path to examine. \end{description} \end{Desc} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf file.h}\end{CompactItemize}