Directory_t Class Reference

Class to read the contents of a directory.

#include <UTDirectory.h>

List of all members.

Public Member Functions

 Directory_t ()
 ~Directory_t ()
Status_t Open (const Path_t &path)
Status_t NextChild (out Path_t *child)
Status_t Close ()

Static Public Member Functions

static Status_t GetFileList (const Path_t &path, out gives OwnedList_t< Path_t > *file_list, const utf8 *only_files_starting_with=NULL)

Detailed Description

Definition at line 37 of file UTDirectory.h.

Constructor & Destructor Documentation

Directory_t::Directory_t (  )  [inline]

Constructor for an empty directory. Open must be called before it can be used.

Definition at line 92 of file UTDirectory.h.

Directory_t::~Directory_t (  )  [inline]

Destructor. If the directory is still open, closes it.

Definition at line 99 of file UTDirectory.h.

Member Function Documentation

Status_t Directory_t::Open ( const Path_t path  ) 

Opens the specified path for reading the contents.

Status_t Directory_t::NextChild ( out Path_t child  ) 

If a child is available, sets *child to indicate its name and returns true. If no more children are available, returns false. Open must be called before NextChild.

Status_t Directory_t::Close (  ) 

Closes the directory.

static Status_t Directory_t::GetFileList ( const Path_t path,
out gives OwnedList_t< Path_t > *  file_list,
const utf8 only_files_starting_with = NULL 
) [static]

Gets a list of files in the directory specified by path. As implied by the use of OwnedList_t for the output list, the caller takes posession of and responsibility for deleting the Path_t objects which will be added to file_list. If only_files_starting_with is not NULL, only files starting with that string will be returned. Depending on the target platform, only_files_starting_with may be case insensitive.

The documentation for this class was generated from the following file:

Generated on Tue Dec 14 22:35:06 2010 for UT library by  doxygen 1.6.1