EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | Static Public Member Functions | List of all members
EDirectory Class Reference

Retrieve file names in a directory. More...

#include <edir.h>

Public Member Functions

 EDirectory ()
 Class constructor. More...
 
 ~EDirectory ()
 Class destructor. More...
 
cpStr getFirstEntry (cpStr pDirectory, cpStr pFileMask)
 Gets the first entry from the directory. More...
 
cpStr getNextEntry ()
 Gets the next entry from the directory. More...
 

Static Public Member Functions

static Void getCurrentDirectory (EString &dir)
 Returns the current working directory. More...
 

Detailed Description

Retrieve file names in a directory.

Constructor & Destructor Documentation

◆ EDirectory()

EDirectory::EDirectory ( )

Class constructor.

◆ ~EDirectory()

EDirectory::~EDirectory ( )

Class destructor.

Member Function Documentation

◆ getCurrentDirectory()

Void EDirectory::getCurrentDirectory ( EString dir)
static

Returns the current working directory.

Parameters
dirA reference to an EString variable where the directory name will be stored.
Exceptions
EDirectoryError_CurrentDirectory

◆ getFirstEntry()

cpStr EDirectory::getFirstEntry ( cpStr  pDirectory,
cpStr  pFileMask 
)

Gets the first entry from the directory.

Parameters
pDirectoryThe directory name to process.
pFileMaskThe file pattern file names must match to be returned.
Returns
a pointer to the file name
Exceptions
EDirectoryError_GetFirstEntry

Returns the first file name from pDirectory that matches pFileMask. pFileMask can contain any alphanumeric character as well as wildcard characters. The supported wildcard characters are '*' which corresponds to any number of any character and '?' which corresonds to a single character.

◆ getNextEntry()

cpStr EDirectory::getNextEntry ( )

Gets the next entry from the directory.

Returns
a pointer to the file name
Exceptions
EDirectoryError_GetNextEntry

Reads the next entry from the directory that matches the previously supplied file name mask. This function will throw EDirectoryError_GetNextEntry if it is called before calling getFirstEntry().


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