![]() |
F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Os/Directory.hpp>
Public Types | |
| enum | Status { OP_OK, DOESNT_EXIST, NO_PERMISSION, NOT_OPENED, NOT_DIR, NO_MORE_FILES, OTHER_ERROR } |
Public Member Functions | |
| Directory () | |
| Constructor. More... | |
| virtual | ~Directory () |
| Destructor. Will close directory if still open. More... | |
| Status | open (const char *dirName) |
| open directory. Directory must already exist More... | |
| bool | isOpen () |
| check if file descriptor is open or not. More... | |
| Status | rewind () |
| rewind directory stream to the beginning More... | |
| Status | read (char *fileNameBuffer, U32 bufSize) |
| get next filename from directory More... | |
| Status | read (char *fileNameBuffer, U32 bufSize, I64 &inode) |
| get next filename and inode from directory More... | |
| void | close () |
| close directory More... | |
| NATIVE_INT_TYPE | getLastError () |
| read back last error code (typically errno) More... | |
| const char * | getLastErrorString () |
| get a string of the last error (typically from strerror) More... | |
Definition at line 11 of file Directory.hpp.
| Enumerator | |
|---|---|
| OP_OK | Operation was successful. |
| DOESNT_EXIST | Directory doesn't exist. |
| NO_PERMISSION | No permission to read directory. |
| NOT_OPENED | Directory hasn't been opened yet. |
| NOT_DIR | Path is not a directory. |
| NO_MORE_FILES | Directory stream has no more files. |
| OTHER_ERROR | A catch-all for other errors. Have to look in implementation-specific code. |
Definition at line 14 of file Directory.hpp.
| Os::Directory::Directory | ( | ) |
Constructor.
Definition at line 17 of file Directory.cpp.
|
virtual |
Destructor. Will close directory if still open.
Definition at line 20 of file Directory.cpp.
| void Os::Directory::close | ( | ) |
close directory
Definition at line 120 of file Directory.cpp.
| NATIVE_INT_TYPE Os::Directory::getLastError | ( | ) |
read back last error code (typically errno)
Definition at line 128 of file Directory.cpp.
| const char * Os::Directory::getLastErrorString | ( | ) |
get a string of the last error (typically from strerror)
Definition at line 132 of file Directory.cpp.
| bool Os::Directory::isOpen | ( | ) |
check if file descriptor is open or not.
Definition at line 116 of file Directory.cpp.
| Directory::Status Os::Directory::open | ( | const char * | dirName | ) |
open directory. Directory must already exist
Definition at line 24 of file Directory.cpp.
| Directory::Status Os::Directory::read | ( | char * | fileNameBuffer, |
| U32 | bufSize | ||
| ) |
get next filename from directory
Definition at line 69 of file Directory.cpp.
| Directory::Status Os::Directory::read | ( | char * | fileNameBuffer, |
| U32 | bufSize, | ||
| I64 & | inode | ||
| ) |
get next filename and inode from directory
Definition at line 76 of file Directory.cpp.
| Directory::Status Os::Directory::rewind | ( | ) |
rewind directory stream to the beginning
Definition at line 53 of file Directory.cpp.