continued host FS test

This commit is contained in:
2022-08-11 10:19:25 +02:00
parent 8aaabc5d73
commit c12492df03
4 changed files with 56 additions and 36 deletions

View File

@ -11,10 +11,10 @@ using namespace std;
HostFilesystem::HostFilesystem() = default;
ReturnValue_t HostFilesystem::writeToFile(FileOpParams params, const uint8_t *data) {
if (params.path == nullptr) {
if (params.path() == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
path path(params.path);
path path(params.path());
if (not exists(path)) {
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
}
@ -29,10 +29,10 @@ ReturnValue_t HostFilesystem::writeToFile(FileOpParams params, const uint8_t *da
ReturnValue_t HostFilesystem::readFromFile(FileOpParams params, uint8_t **buffer, size_t &readSize,
size_t maxSize) {
if (params.path == nullptr) {
if (params.path() == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
path path(params.path);
path path(params.path());
if (not exists(path)) {
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
}