F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
File.cpp
Go to the documentation of this file.
1// ======================================================================
2// \title Os/Stub/File.cpp
3// \brief stub implementation for Os::File
4// ======================================================================
5#include "Os/Stub/File.hpp"
6
7namespace Os {
8namespace Stub {
9namespace File {
10
11 StubFile::Status StubFile::open(const char *filepath, StubFile::Mode open_mode, OverwriteType overwrite) {
13 return status;
14 }
15
17
20 return status;
21 }
22
25 return status;
26 }
27
32
35 return status;
36 }
37
40 return status;
41 }
42
45 return status;
46 }
47
50 return status;
51 }
52
54 return &this->m_handle;
55 }
56
57} // namespace File
58} // namespace Stub
59} // namespace Os
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:30
PlatformSignedSizeType FwSignedSizeType
Definition FpConfig.h:30
@ NOT_SUPPORTED
Kernel or file system does not support operation.
Definition File.hpp:37
Status preallocate(FwSignedSizeType offset, FwSignedSizeType length) override
pre-allocate file storage
Definition File.cpp:28
Status read(U8 *buffer, FwSignedSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
Definition File.cpp:43
Status size(FwSignedSizeType &size_result) override
get size of currently open file
Definition File.cpp:18
void close() override
close the file, if not opened then do nothing
Definition File.cpp:16
Os::FileInterface::Status open(const char *path, Mode mode, OverwriteType overwrite) override
open file with supplied path and mode
Definition File.cpp:11
Status seek(FwSignedSizeType offset, SeekType seekType) override
seek the file pointer to the given offset
Definition File.cpp:33
FileHandle * getHandle() override
returns the raw file handle
Definition File.cpp:53
Status flush() override
flush file contents to storage
Definition File.cpp:38
Status write(const U8 *buffer, FwSignedSizeType &size, WaitType wait) override
read data from this file into supplied buffer bounded by size
Definition File.cpp:48
Status position(FwSignedSizeType &position_result) override
get file pointer position of the currently open file
Definition File.cpp:23
base implementation of FileHandle
Definition File.hpp:14