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/Posix/FileSystem.hpp
3// \brief Posix FileSystem definitions for Os::FileSystem
4// ======================================================================
5#ifndef OS_POSIX_FILESYSTEM_HPP
6#define OS_POSIX_FILESYSTEM_HPP
7
8#include "Os/FileSystem.hpp"
9
10namespace Os {
11namespace Posix {
12namespace FileSystem {
13
15
21 public:
23 PosixFileSystem() = default;
24
26 ~PosixFileSystem() override = default;
27
28 // ------------------------------------------------------------
29 // Implementation-specific member functions - overrides
30 // ------------------------------------------------------------
31
38 Status _removeDirectory(const char* path) override;
39
46 Status _removeFile(const char* path) override;
47
58 Status _rename(const char* sourcePath, const char* destPath) override;
59
68 Status _getFreeSpace(const char* path, FwSizeType& totalBytes, FwSizeType& freeBytes) override;
69
81 Status _getWorkingDirectory(char* path, FwSizeType bufferSize) override;
82
89 Status _changeWorkingDirectory(const char* path) override;
90
97 FileSystemHandle* getHandle() override;
98
99 private:
101 PosixFileSystemHandle m_handle;
102}; // class PosixFileSystem
103
104} // namespace FileSystem
105} // namespace Posix
106} // namespace Os
107#endif // OS_POSIX_FILESYSTEM_HPP
PlatformSizeType FwSizeType
Definition FpConfig.h:35
Posix implementation of Os::FileSystem.
Status _removeFile(const char *path) override
Remove a file at the specified path.
Status _changeWorkingDirectory(const char *path) override
Change the current working directory to the specified path.
~PosixFileSystem() override=default
destructor
Status _getWorkingDirectory(char *path, FwSizeType bufferSize) override
Get the current working directory.
FileSystemHandle * getHandle() override
Get the raw FileSystem handle.
Status _removeDirectory(const char *path) override
Remove a directory at the specified path.
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 _rename(const char *sourcePath, const char *destPath) override
Rename a file from source to destination.