distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
#include "distortos/FileSystem/Directory.hpp"
Public Member Functions | |
virtual | ~Directory ()=default |
Directory's destructor. More... | |
virtual int | close ()=0 |
Closes directory. More... | |
virtual std::pair< int, off_t > | getPosition ()=0 |
Returns current position in the directory. More... | |
virtual void | lock ()=0 |
Locks the directory for exclusive use by current thread. More... | |
virtual int | read (dirent &entry)=0 |
Reads next entry from directory. More... | |
virtual int | rewind ()=0 |
Resets current position in the directory. More... | |
virtual int | seek (off_t position)=0 |
Moves position in the directory. More... | |
virtual void | unlock ()=0 |
Unlocks the directory which was previously locked by current thread. More... | |
Directory (const Directory &)=delete | |
Directory & | operator= (const Directory &)=delete |
Directory class is an interface for a directory.
|
virtualdefault |
Directory's destructor.
|
pure virtual |
Closes directory.
Similar to closedir()
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Returns current position in the directory.
Similar to telldir()
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Locks the directory for exclusive use by current thread.
When the object is locked, any call to any member function from other thread will be blocked until the object is unlocked. Locking is optional, but may be useful when more than one operation must be done atomically.
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Reads next entry from directory.
Similar to readdir_r()
[out] | entry | is a reference to dirent struct into which next entry from directory will be written |
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Resets current position in the directory.
Similar to rewinddir()
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Moves position in the directory.
Similar to seekdir()
[in] | position | is the value of position, must be a value previously returned by getPosition()! |
Implemented in distortos::Littlefs1Directory.
|
pure virtual |
Unlocks the directory which was previously locked by current thread.
Implemented in distortos::Littlefs1Directory.