openMSX
|
Simple wrapper around opendir() / readdir() / closedir() functions. More...
#include <ReadDir.hh>
Public Member Functions | |
ReadDir (zstring_view directory) | |
struct dirent * | getEntry () |
Get directory entry for next file. | |
bool | isValid () const |
Is the given directory valid (does it exist)? | |
Simple wrapper around opendir() / readdir() / closedir() functions.
Mainly useful to automatically call closedir() when object goes out of scope.
Definition at line 17 of file ReadDir.hh.
|
inlineexplicit |
Definition at line 20 of file ReadDir.hh.
|
inline |
Get directory entry for next file.
Returns nullptr when there are no more entries or in case of error (e.g. given directory does not exist).
Definition at line 27 of file ReadDir.hh.
Referenced by openmsx::FileOperations::deleteRecursive(), openmsx::detail::foreach_dirent(), and openmsx::FileOperations::getNextNumberedFileName().
|
inline |
Is the given directory valid (does it exist)?
Definition at line 34 of file ReadDir.hh.