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 |
uint32_t | count () const |
bool | isValid () const |
file_size_t | size () const |
const Stat & | stat () const |
bool | next () |
FsBase (IFileSystem *filesys=nullptr) | |
![]() | |
FsBase (IFileSystem *filesys=nullptr) | |
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 | |
![]() | |
bool | check (int64_t res) |
Check file operation result and note error code. More... | |
![]() | |
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
◆ FsBase()
|
inline |
◆ 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()
bool IFS::Directory::open | ( | const String & | dirName = nullptr | ) |
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: