6 #ifndef OS_POSIX_FILE_HPP 7 #define OS_POSIX_FILE_HPP 72 void close()
override;
181 #endif // OS_POSIX_FILE_HPP static constexpr PlatformIntType ERROR_RETURN_VALUE
Status size(FwSizeType &size_result) override
get size of currently open file
base implementation of FileHandle
Status preallocate(FwSizeType offset, FwSizeType length) override
pre-allocate file storage
PlatformSizeType FwSizeType
PosixFile()=default
constructor
PlatformSignedSizeType FwSignedSizeType
static constexpr PlatformIntType INVALID_FILE_DESCRIPTOR
posix implementation of Os::File
~PosixFile() override=default
destructor
Status write(const U8 *buffer, FwSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
Status read(U8 *buffer, FwSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
void close() override
close the file, if not opened then do nothing
uint8_t U8
8-bit unsigned integer
PosixFile & operator=(const PosixFile &other)
assignment operator that copies the internal representation
Status seek(FwSignedSizeType offset, SeekType seekType) override
seek the file pointer to the given offset
Status flush() override
flush file contents to storage
FileHandle * getHandle() override
returns the raw file handle
Status position(FwSizeType &position_result) override
get file pointer position of the currently open file
PlatformIntType m_file_descriptor
Posix file descriptor.
Os::FileInterface::Status open(const char *path, Mode mode, OverwriteType overwrite) override
open file with supplied path and mode