class OEDirectoryScan

This class represents OEDirectoryScan.

The OEDirectoryScan class provides a portable way of retrieving the names of all the files and subdirectories in a given directory.


OEDirectoryScan(const char *dname)

The constructor for OEDirectoryScan specifies the name of the directory to scan. A NULL pointer, (char*)0, is taken to mean the current directory and is equivalent to ".".

operator bool

operator bool() const

Checks whether the OEDirectoryScan has been successfully opened and is still valid. A return value of true does not guarantee that the next call to the Next method will not return (const char*)0.


void Close()

Closes the OEDirectoryScan and frees any system resources. This method is invoked automatically by the classes’ destructor. Following a call to Close, operator bool will always return false.


const char *Next()

Returns the next file name sequentially in the directory scan. This function automatically advances the directory pointer. The returned value is a pointer to the local filename, i.e. without its directory prefix. Upon reaching the end of the directory, this function returns (const char*)0, and the OEDirectoryScan is closed.