8 File::File() :m_fd(0),m_mode(OPEN_NO_MODE),m_lastError(0) {}
PlatformIntType NATIVE_INT_TYPE
C++-compatible configuration header for fprime configuration.
bool isOpen()
check if file descriptor is open or not.
@ NOT_OPENED
file hasn't been opened yet
Status write(const void *buffer, NATIVE_INT_TYPE &size, bool waitForDone=true)
write size; will return amount written or errno
const char * getLastErrorString()
get a string of the last error (typically from strerror)
Status seek(NATIVE_INT_TYPE offset, bool absolute=true)
seek to location. If absolute = true, absolute from beginning of file
NATIVE_INT_TYPE getLastError()
read back last error code (typically errno)
Status open(const char *fileName, Mode mode)
open file. Writing creates file if it doesn't exist
virtual ~File()
Destructor. Will close file if still open.
Status read(void *buffer, NATIVE_INT_TYPE &size, bool waitForFull=true)
waitForFull = true to wait for all bytes to be read