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. | |
| ~directoryIterator () | |
| Destructor. | |
| bool | exists () const noexcept |
| Directory open succeeded. | |
| bool | good () const noexcept |
| Directory pointer is valid. | |
| void | close () |
| Close directory. | |
| const std::string & | val () const noexcept |
| The current item. | |
| bool | next () |
| Read next item, always ignoring "." and ".." entries. | |
| operator bool () const noexcept | |
| Same as good(). | |
| const std::string & | operator* () const noexcept |
| Same as val(). | |
| directoryIterator & | operator++ () |
| Same as next(). | |
|
inline |
Construct for dirName, optionally allowing hidden files/dirs.
Definition at line 194 of file POSIX.C.
Referenced by operator++().

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

|
inlinenoexcept |
Directory pointer is valid.
Definition at line 232 of file POSIX.C.
References Foam::noexcept.
Referenced by operator bool().

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

|
inlinenoexcept |
The current item.
Definition at line 252 of file POSIX.C.
References Foam::noexcept.
Referenced by 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 263 of file POSIX.C.
References close().
Referenced by operator++().


|
inlinenoexcept |
Same as good().
Definition at line 287 of file POSIX.C.
References good(), and Foam::noexcept.

|
inlinenoexcept |
Same as val().
Definition at line 295 of file POSIX.C.
References Foam::noexcept, and val().

|
inline |
Same as next().
Definition at line 303 of file POSIX.C.
References directoryIterator(), and next().
