Mbed OS Reference
|
Represents a directory stream. More...
#include <DirHandle.h>
Public Member Functions | |
virtual ssize_t | read (struct dirent *ent)=0 |
Read the next directory entry. More... | |
virtual int | close ()=0 |
Close a directory. More... | |
virtual void | seek (off_t offset)=0 |
Set the current position of the directory. More... | |
virtual off_t | tell ()=0 |
Get the current position of the directory. More... | |
virtual void | rewind ()=0 |
Rewind the current position to the beginning of the directory. More... | |
virtual size_t | size () |
Get the sizeof the directory. More... | |
Represents a directory stream.
An opendir function returns objects of this type. The core functions are read and seek, but only a subset needs to be provided.
If a FileSystemLike class defines the opendir method, then you can access the directories of an object of that type by either:
or
to open the root of the file system.
The root directory is considered to contain all FileHandle and FileSystem objects, so the DIR pointer returned by opendir("/") reflects this.
Definition at line 55 of file DirHandle.h.
|
pure virtual |
Read the next directory entry.
ent | The directory entry to fill out |
Implemented in Dir.
|
pure virtual |
|
pure virtual |
Set the current position of the directory.
offset | Offset of the location to seek to, must be a value returned from tell |
Implemented in Dir.
|
pure virtual |
Get the current position of the directory.
Implemented in Dir.
|
pure virtual |
Rewind the current position to the beginning of the directory.
Implemented in Dir.
|
virtual |
Get the sizeof the directory.
Reimplemented in Dir.
Definition at line 93 of file DirHandle.h.