fsfw/src/fsfw_hal/host/HostFilesystem.h

33 lines
1.3 KiB
C
Raw Normal View History

2022-08-10 17:03:23 +02:00
#ifndef FSFW_HAL_HOSTFILESYSTEM_H
#define FSFW_HAL_HOSTFILESYSTEM_H
#include <system_error>
#include "fsfw/filesystem/HasFileSystemIF.h"
class HostFilesystem : public HasFileSystemIF {
public:
HostFilesystem();
2022-09-05 17:42:56 +02:00
bool fileExists(FilesystemParams params) override;
ReturnValue_t truncateFile(FilesystemParams params) override;
2022-08-10 17:03:23 +02:00
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 char *path, FileSystemArgsIF *args) override;
ReturnValue_t createDirectory(FilesystemParams params, bool createParentDirs) override;
ReturnValue_t removeDirectory(FilesystemParams params, bool deleteRecurively) override;
2022-08-11 10:10:05 +02:00
ReturnValue_t rename(const char *oldPath, const char *newPath, FileSystemArgsIF *args) override;
2022-08-10 17:03:23 +02:00
std::error_code errorCode;
2022-08-11 10:10:05 +02:00
using HasFileSystemIF::createDirectory;
2022-08-11 09:59:14 +02:00
using HasFileSystemIF::createFile;
2022-08-11 10:10:05 +02:00
using HasFileSystemIF::removeDirectory;
2022-08-11 09:59:14 +02:00
using HasFileSystemIF::removeFile;
2022-08-11 10:10:05 +02:00
using HasFileSystemIF::rename;
2022-08-10 17:03:23 +02:00
private:
};
#endif // FSFW_HAL_HOSTFILESYSTEM_H