F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
FileSystem.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Os/Stub/FileSystem.hpp
3// \brief stub fileSystem definitions for Os::FileSystem
4// ======================================================================
5#ifndef OS_STUB_FILESYSTEM_HPP
6#define OS_STUB_FILESYSTEM_HPP
7
8#include "Os/FileSystem.hpp"
9
10namespace Os {
11namespace Stub {
12namespace FileSystem {
13
15
21 public:
23 StubFileSystem() = default;
24
26 ~StubFileSystem() override = default;
27
28
29 // ------------------------------------------------------------
30 // Implementation-specific FileSystem member functions
31 // ------------------------------------------------------------
32
39 Status _removeDirectory(const char* path) override;
40
47 Status _removeFile(const char* path) override;
48
59 Status _rename(const char* sourcePath, const char* destPath) override;
60
69 Status _getFreeSpace(const char* path, FwSizeType& totalBytes, FwSizeType& freeBytes) override;
70
82 Status _getWorkingDirectory(char* path, FwSizeType bufferSize) override;
83
90 Status _changeWorkingDirectory(const char* path) override;
91
92
93
101 FileSystemHandle *getHandle() override;
102
103
104private:
106 StubFileSystemHandle m_handle;
107};
108
109} // namespace FileSystem
110} // namespace Stub
111} // namespace Os
112#endif // OS_STUB_FILESYSTEM_HPP
PlatformSizeType FwSizeType
Definition FpConfig.h:35
stub implementation of Os::FileSystem
Status _removeDirectory(const char *path) override
Remove a directory at the specified path.
StubFileSystem()=default
constructor
Status _rename(const char *sourcePath, const char *destPath) override
Rename a file from source to destination.
Status _getFreeSpace(const char *path, FwSizeType &totalBytes, FwSizeType &freeBytes) override
Get filesystem free and total space in bytes on the filesystem containing the specified path.
Status _removeFile(const char *path) override
Remove a file at the specified path.
Status _getWorkingDirectory(char *path, FwSizeType bufferSize) override
Get the current working directory.
Status _changeWorkingDirectory(const char *path) override
Change the current working directory to the specified path.
~StubFileSystem() override=default
destructor
FileSystemHandle * getHandle() override
returns the raw fileSystem handle