This repo contains the libraries of Mbed for LPC1549 with following changes: - IAP commands. - EEPROM write and read. - UART write and read (public) - CAN can_s -> LPC_C_CAN0_Type *can
DirHandle Class Reference
Represents a directory stream. More...
#include <DirHandle.h>
Public Member Functions | |
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. |
Detailed Description
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.
Definition at line 48 of file DirHandle.h.
Member Function Documentation
virtual int closedir | ( | ) | [pure virtual] |
Closes the directory.
- Returns:
- 0 on success, -1 on error.
virtual struct dirent* readdir | ( | ) | [read, pure virtual] |
Return the directory entry at the current position, and advances the position to the next entry.
- Returns:
- 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 | ( | ) | [pure virtual] |
Resets the position to the beginning of the directory.
virtual void seekdir | ( | off_t | location ) | [virtual] |
Sets the position of the DirHandle.
- Parameters:
-
location The location to seek to. Must be a value returned by telldir.
Definition at line 85 of file DirHandle.h.
virtual off_t telldir | ( | ) | [virtual] |
Returns the current position of the DirHandle.
- Returns:
- the current position, -1 on error.
Definition at line 79 of file DirHandle.h.
Generated on Wed Jul 13 2022 17:09:46 by
![doxygen](doxygen.png)