A simple directory contents iterator. More...
Public Member Functions | |
directoryIterator (const std::string &dirName, bool allowHidden=false) | |
Construct for dirName, optionally allowing hidden files/dirs. More... | |
~directoryIterator () | |
Destructor. More... | |
bool | exists () const noexcept |
Directory existed for opening. More... | |
bool | good () const noexcept |
Directory pointer is valid. More... | |
void | close () |
Close directory. More... | |
const std::string & | val () const noexcept |
The current item. More... | |
bool | next () |
Read next item, always ignoring "." and ".." entries. More... | |
operator bool () const noexcept | |
Same as good() More... | |
const std::string & | operator* () const noexcept |
Same as val() More... | |
directoryIterator & | operator++ () |
Same as next() More... | |
A simple directory contents iterator.
Definition at line 111 of file MSwindows.C.
|
inline |
Construct for dirName, optionally allowing hidden files/dirs.
Definition at line 135 of file MSwindows.C.
References directoryIterator::good(), and directoryIterator::next().
|
inline |
Destructor.
Definition at line 164 of file MSwindows.C.
References directoryIterator::close().
|
inlinenoexcept |
Directory existed for opening.
Definition at line 173 of file MSwindows.C.
Referenced by Foam::readDir(), and Foam::rmDir().
|
inlinenoexcept |
Directory pointer is valid.
Definition at line 179 of file MSwindows.C.
Referenced by directoryIterator::close(), directoryIterator::directoryIterator(), and directoryIterator::operator bool().
|
inline |
Close directory.
Definition at line 185 of file MSwindows.C.
References directoryIterator::good().
Referenced by directoryIterator::~directoryIterator().
|
inlinenoexcept |
The current item.
Definition at line 195 of file MSwindows.C.
Referenced by directoryIterator::operator*().
|
inline |
Read next item, always ignoring "." and ".." entries.
Normally also ignore hidden files/dirs (beginning with '.') Automatically close when it runs out of items
Definition at line 203 of file MSwindows.C.
Referenced by directoryIterator::directoryIterator(), and directoryIterator::operator++().
|
inlinenoexcept |
Same as good()
Definition at line 228 of file MSwindows.C.
References directoryIterator::good().
|
inlinenoexcept |
Same as val()
Definition at line 234 of file MSwindows.C.
References directoryIterator::val().
|
inline |
Same as next()
Definition at line 240 of file MSwindows.C.
References directoryIterator::next().