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