IFS::Directory Class Reference
Wrapper class for enumerating a directory. More...
#include <Directory.h>
Inheritance diagram for IFS::Directory:
Collaboration diagram for IFS::Directory:
Public Member Functions | |
| ~Directory () | |
| bool | open (const String &dirName=nullptr) |
| Open a directory and attach this stream object to it. More... | |
| void | close () |
| Close directory. More... | |
| bool | rewind () |
| Rewind directory stream to start so it can be re-enumerated. More... | |
| const String & | getDirName () const |
| Name of directory stream is attached to. More... | |
| bool | dirExist () const |
| Determine if directory exists. More... | |
| String | getPath () const |
| Get path with leading separator /path/to/dir. More... | |
| String | getParent () const |
| Get parent directory. More... | |
| int | index () const |
| size_t | count () const |
| bool | isValid () const |
| size_t | size () const |
| const Stat & | stat () const |
| bool | next () |
Public Member Functions inherited from IFS::FsBase | |
| FsBase (IFileSystem *filesys) | |
| bool | isValid () const |
| int | getLastError () |
| determine if an error occurred during operation More... | |
| String | getErrorString (int err) const |
| String | getLastErrorString () const |
| FileSystem * | getFileSystem () const |
Additional Inherited Members | |
Protected Member Functions inherited from IFS::FsBase | |
| bool | check (int res) |
| Check file operation result and note error code. More... | |
Protected Attributes inherited from IFS::FsBase | |
| int | lastError {FS_OK} |
Detailed Description
Wrapper class for enumerating a directory.
Constructor & Destructor Documentation
◆ ~Directory()
|
inline |
Member Function Documentation
◆ close()
| void IFS::Directory::close | ( | ) |
Close directory.
◆ count()
|
inline |
◆ dirExist()
|
inline |
Determine if directory exists.
- Return values
-
bool true if stream is attached to a directory
◆ getDirName()
|
inline |
Name of directory stream is attached to.
- Return values
-
String invalid if stream isn't open
◆ getParent()
| String IFS::Directory::getParent | ( | ) | const |
Get parent directory.
- Return values
-
String invalid if there is no parent directory
◆ getPath()
| String IFS::Directory::getPath | ( | ) | const |
Get path with leading separator /path/to/dir.
◆ index()
|
inline |
◆ isValid()
|
inline |
◆ next()
| bool IFS::Directory::next | ( | ) |
◆ open()
Open a directory and attach this stream object to it.
- Parameters
-
dirName Default is root directory
- Return values
-
bool true on success, false on error
- Note
- call getLastError() to determine cause of failure
◆ rewind()
| bool IFS::Directory::rewind | ( | ) |
Rewind directory stream to start so it can be re-enumerated.
- Return values
-
bool true on success, false on error
- Note
- call getLastError() to determine cause of failure
◆ size()
|
inline |
◆ stat()
|
inline |
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.13