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... | |
| virtual int | closedir () | 
| Closes the directory.  More... | |
| virtual struct dirent * | readdir () | 
| Returns the directory entry at the current position, and advances the position to the next entry.  More... | |
| virtual void | rewinddir () | 
| Resets the position to the beginning of the directory.  More... | |
| virtual off_t | telldir () | 
| Returns the current position of the DirHandle.  More... | |
| virtual void | seekdir (off_t location) | 
| Sets the position of the DirHandle.  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 | 
| 
 | virtual | 
Closes the directory.
Definition at line 117 of file DirHandle.h.
| 
 | pure virtual | 
Read the next directory entry.
| ent | The directory entry to fill out | 
Implemented in Dir.
| 
 | virtual | 
Returns the directory entry at the current position, and advances the position to the next entry.
Definition at line 132 of file DirHandle.h.
| 
 | pure virtual | 
Rewind the current position to the beginning of the directory.
Implemented in Dir.
| 
 | virtual | 
Resets the position to the beginning of the directory.
Definition at line 142 of file DirHandle.h.
| 
 | 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.
| 
 | virtual | 
Sets the position of the DirHandle.
| location | The location to seek to. Must be a value returned by telldir. | 
Definition at line 166 of file DirHandle.h.
| 
 | virtual | 
Get the sizeof the directory.
Reimplemented in Dir.
Definition at line 93 of file DirHandle.h.
| 
 | pure virtual | 
Get the current position of the directory.
Implemented in Dir.
| 
 | virtual | 
Returns the current position of the DirHandle.
Definition at line 155 of file DirHandle.h.