#include <directoryreader.h>
Public Member Functions | |
DirectoryReader () | |
Constructor. | |
DirectoryReader (PMString directoryName) | |
Constructor that opens directoryName. | |
~DirectoryReader () | |
Destructor. | |
std::vector< PMString > | ListDir (PMString directoryName) |
Return vector of PMStrings of files in directoryName. | |
void | openDir (PMString directoryName) |
Open directoryName. | |
void | closeDir () |
Close current directory. | |
PMString | getFileName () |
Get the next filename in the directory. | |
PMString | getFileName (int index) |
Get the filename located at index in the list ( starting at 0 ). | |
dirent ** | getDirent () |
Return the dirent. | |
Protected Member Functions | |
void | _freeDirent () |
Free the memory used by dirent. | |
Protected Attributes | |
int | _currentFileNameIndex |
The index of the file last sent by getFileName(). | |
int | _filesInDirectory |
The number of files in the scanned directory. | |
dirent ** | _dirList |
The dirent. |
|
Empty Constructor. |
|
Constructor that opens a directory straight away.
|
|
Destructor, makes sure we have freed. |
|
Free the dirent. |
|
Close the dir. |
|
Get the dirent.
|
|
Returns the numbered filename from the list. Throws DirectoryException when the filename does not exist.
|
|
Returns the next filename from the list. Throws DirectoryException when there are no more filenames to get.
|
|
Get a vector full of the files in directory in directoryName in alphabetical order.
|
|
Open a directory, throws a DirectoryException if error opening a directory.
|