mbed library sources
Fork of mbed-src by
DirHandle Class Reference
Represents a directory stream. More...
Inherited by BaseDirHandle, and LocalDirHandle.
|virtual int||closedir ()=0|
|Closes the directory. |
|virtual struct dirent *||readdir ()=0|
|Return the directory entry at the current position, and advances the position to the next entry. |
|virtual void||rewinddir ()=0|
|Resets the position to the beginning of the directory. |
|virtual off_t||telldir ()|
|Returns the current position of the DirHandle. |
|virtual void||seekdir (off_t location)|
|Sets the position of the DirHandle. |
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.
Member Function Documentation
|virtual int closedir||(||)||
Closes the directory.
- 0 on success, -1 on error.
|virtual struct dirent* readdir||(||)||
Return the directory entry at the current position, and advances the position to the next entry.
- A pointer to a dirent structure representing the directory entry at the current position, or NULL on reaching end of directory or error.
|virtual void rewinddir||(||)||
Resets the position to the beginning of the directory.
|virtual void seekdir||(||off_t||location )||
Generated on Mon Dec 17 2018 18:22:46 by 1.7.2