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 open succeeded. 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... | |
|
inline |
Construct for dirName, optionally allowing hidden files/dirs.
Definition at line 192 of file POSIX.C.
References directoryIterator::next().

|
inline |
Destructor.
Definition at line 211 of file POSIX.C.
References directoryIterator::close().

|
inlinenoexcept |
Directory open succeeded.
Definition at line 222 of file POSIX.C.
Referenced by Foam::readDir(), and Foam::rmDir().

|
inlinenoexcept |
Directory pointer is valid.
Definition at line 230 of file POSIX.C.
Referenced by directoryIterator::operator bool().

|
inline |
Close directory.
Definition at line 238 of file POSIX.C.
Referenced by directoryIterator::next(), and directoryIterator::~directoryIterator().

|
inlinenoexcept |
The current item.
Definition at line 250 of file POSIX.C.
Referenced by directoryIterator::operator*().

|
inline |
Read next item, always ignoring "." and ".." entries.
Normally also ignore hidden files/dirs (beginning with '.') Automatically close when there are no more items
Definition at line 261 of file POSIX.C.
References directoryIterator::close().
Referenced by directoryIterator::directoryIterator(), and directoryIterator::operator++().


|
inlinenoexcept |
Same as good()
Definition at line 285 of file POSIX.C.
References directoryIterator::good().

|
inlinenoexcept |
Same as val()
Definition at line 293 of file POSIX.C.
References directoryIterator::val().

|
inline |
Same as next()
Definition at line 301 of file POSIX.C.
References directoryIterator::next().
