Public Member Functions

Celartem::FileUtils::DirectoryListing Class Reference

#include <cel_fileutil.h>

List of all members.

Public Member Functions

 DirectoryListing (const String &inDirName)
 ~DirectoryListing ()
String getNextEntry ()

Detailed Description

This class enumerates the child files and directories of the specified directory. This class does not report the existance of "." and "..".
The following code illustrates how to use this class:

            DirectoryListing dl("C:\\MyFolder");
            for(;;)
            {
                String fullpath = dl.getNextEntry();

                // If you want to get only body name, use getFileNameFromPath
                String filename = FileUtils::getFileNameFromPath(fullpath);

                ...
            }
See also:
getFileNameFromPath

Constructor & Destructor Documentation

Celartem::FileUtils::DirectoryListing::DirectoryListing ( const String inDirName  ) 

This constructor creates a new instance of DirectoryListing class.

Parameters:
inDirName Specifies the path of the directory to create file list.
Celartem::FileUtils::DirectoryListing::~DirectoryListing (  ) 

Destructor.


Member Function Documentation

String Celartem::FileUtils::DirectoryListing::getNextEntry (  ) 

This method returns full path name of the next entry in the directory. If there're no more file/directory entries in the directory, this function returns NullString.

Returns:
The full path name of an entry.

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:21.
Caminova Logo