mbed-drivers
|
#include <DirHandle.h>
Public Member Functions | |
virtual int | closedir ()=0 |
virtual struct dirent * | readdir ()=0 |
virtual void | rewinddir ()=0 |
virtual off_t | telldir () |
virtual void | seekdir (off_t location) |
Represents a directory stream. Objects of this type are returned by a FileSystemLike's opendir method. Implementations must define at least closedir, readdir and rewinddir.
If a FileSystemLike class defines the opendir method, then the directories of an object of that type can be accessed by DIR *d = opendir("/example/directory") (or opendir("/example") to open the root of the filesystem), and then using readdir(d) etc.
The root directory is considered to contain all FileLike and FileSystemLike objects, so the DIR* returned by opendir("/") will reflect this.
|
pure virtual |
|
pure virtual |
Return the directory entry at the current position, and advances the position to the next entry.
Implemented in mbed::BaseDirHandle.
|
pure virtual |
Resets the position to the beginning of the directory.
Implemented in mbed::BaseDirHandle.
|
inlinevirtual |
Sets the position of the DirHandle.
location | The location to seek to. Must be a value returned by telldir. |
Reimplemented in mbed::BaseDirHandle.
|
inlinevirtual |
Returns the current position of the DirHandle.
Reimplemented in mbed::BaseDirHandle.