6 #ifndef _OS_DIRECTORY_HPP_ 7 #define _OS_DIRECTORY_HPP_ 108 virtual void close() = 0;
178 void close()
override;
Status readDirectory(Fw::String filenameArray[], const FwSizeType arraySize, FwSizeType &filenameCount)
Read the contents of the directory and store filenames in filenameArray of size arraySize.
Directory has more files than can be read.
virtual DirectoryHandle * getHandle()=0
return the underlying Directory handle (implementation specific)
virtual ~DirectoryInterface()=default
default virtual destructor
U8 DirectoryHandleStorage[FW_DIRECTORY_HANDLE_MAX_SIZE]
virtual Status read(char *fileNameBuffer, FwSizeType buffSize)=0
Get next filename from directory stream.
PlatformSizeType FwSizeType
Directory doesn't exist.
DirectoryInterface()=default
default constructor
Status rewind() override
Rewind directory stream.
Directory hasn't been opened yet.
A catch-all for other errors. Have to look in implementation-specific code.
No permission to read directory.
Status getFileCount(FwSizeType &fileCount)
Get the number of files in the directory.
void close() override
Close directory.
Status read(char *fileNameBuffer, FwSizeType buffSize) override
Get next filename from directory stream.
Create directory if it doesn't exist.
Directory stream has no more files.
C++-compatible configuration header for fprime configuration.
DirectoryInterface & operator=(const DirectoryInterface &other)=delete
assignment operator is forbidden
Create directory and error if it already exists.
Maximum value of OpenMode.
Directory stream descriptor is invalid.
Operation was successful.
bool isOpen()
Check if Directory is open or not.
Status open(const char *path, OpenMode mode) override
Open or create a directory.
virtual Status open(const char *path, OpenMode mode)=0
Open or create a directory.
DirectoryHandle * getHandle() override
return the underlying Directory handle (implementation specific)
static DirectoryInterface * getDelegate(DirectoryHandleStorage &aligned_new_memory)
provide a pointer to a Directory delegate object
Directory already exists.
virtual Status rewind()=0
Rewind directory stream.
Operation is not supported by the current implementation.
#define FW_HANDLE_ALIGNMENT
Alignment of handle storage.
~Directory() final
Destructor.
virtual void close()=0
Get next filename from directory stream and write it to a Fw::StringBase object.
Error if directory doesn't exist.