fsfw/src/fsfw_hal/host/HostFilesystem.h
Ulrich Mohr e37af4fe70
All checks were successful
fsfw/fsfw/pipeline/head This commit looks good
format
2023-01-26 13:40:44 +01:00

36 lines
1.4 KiB
C++

#ifndef FSFW_HAL_HOSTFILESYSTEM_H
#define FSFW_HAL_HOSTFILESYSTEM_H
#include <system_error>
#include "fsfw/filesystem/HasFileSystemIF.h"
class HostFilesystem : public HasFileSystemIF {
public:
HostFilesystem();
bool fileExists(FilesystemParams params) override;
ReturnValue_t truncateFile(FilesystemParams params) override;
ReturnValue_t writeToFile(FileOpParams params, const uint8_t *data) override;
ReturnValue_t readFromFile(FileOpParams fileOpInfo, uint8_t **buffer, size_t &readSize,
size_t maxSize) override;
ReturnValue_t createFile(FilesystemParams params, const uint8_t *data, size_t size) override;
ReturnValue_t removeFile(const std::filesystem::path::value_type *path,
FileSystemArgsIF *args) override;
ReturnValue_t createDirectory(FilesystemParams params, bool createParentDirs) override;
ReturnValue_t removeDirectory(FilesystemParams params, bool deleteRecurively) override;
ReturnValue_t rename(const std::filesystem::path::value_type *oldPath,
const std::filesystem::path::value_type *newPath,
FileSystemArgsIF *args) override;
std::error_code errorCode;
using HasFileSystemIF::createDirectory;
using HasFileSystemIF::createFile;
using HasFileSystemIF::removeDirectory;
using HasFileSystemIF::removeFile;
using HasFileSystemIF::rename;
private:
};
#endif // FSFW_HAL_HOSTFILESYSTEM_H