DirectoryIterator for iterating over files and directories. More...
#include <DirectoryIterator.h>
Public Member Functions | |
std::string | currentEntry () |
Returns the name of the current entry. | |
std::string | currentPath () |
Returns the path of the current entry. | |
DirectoryIterator (const std::string &path) | |
Constructor. | |
bool | hasNext () |
Verifies if another entry exist in the directory. | |
std::string | next () |
Advances the iterator and returns the name of the next entry. | |
~DirectoryIterator () | |
Destructor. | |
Private Attributes | |
DirectoryIteratorPrivate * | d |
DirectoryIterator for iterating over files and directories.
DirectoryIterator class for iterating over files and directories on the filesystem.
Definition at line 46 of file DirectoryIterator.h.
alvar::DirectoryIterator::DirectoryIterator | ( | const std::string & | path | ) |
Constructor.
path | The path on the filesystem to iterate. |
Definition at line 30 of file DirectoryIterator.cpp.
Destructor.
Definition at line 35 of file DirectoryIterator.cpp.
std::string alvar::DirectoryIterator::currentEntry | ( | ) |
Returns the name of the current entry.
Definition at line 50 of file DirectoryIterator.cpp.
std::string alvar::DirectoryIterator::currentPath | ( | ) |
Returns the path of the current entry.
This appends the name of the current entry to the path of the directory that is being iterated.
Definition at line 55 of file DirectoryIterator.cpp.
bool alvar::DirectoryIterator::hasNext | ( | ) |
Verifies if another entry exist in the directory.
Definition at line 40 of file DirectoryIterator.cpp.
std::string alvar::DirectoryIterator::next | ( | ) |
Advances the iterator and returns the name of the next entry.
Definition at line 45 of file DirectoryIterator.cpp.
Definition at line 85 of file DirectoryIterator.h.