FS: Stub card SPI and some other things

This commit is contained in:
wheremyfoodat 2024-12-09 19:08:30 +02:00
parent 055dbc7fb6
commit cc669d7cab
12 changed files with 139 additions and 21 deletions

View file

@ -0,0 +1,40 @@
#include <algorithm>
#include <memory>
#include "fs/archive_card_spi.hpp"
namespace fs = std::filesystem;
HorizonResult CardSPIArchive::createFile(const FSPath& path, u64 size) {
Helpers::panic("[Card SPI] CreateFile not yet supported");
return Result::Success;
}
HorizonResult CardSPIArchive::deleteFile(const FSPath& path) {
Helpers::panic("[Card SPI] Unimplemented DeleteFile");
return Result::Success;
}
HorizonResult CardSPIArchive::createDirectory(const FSPath& path) {
Helpers::panic("[Card SPI] CreateDirectory not yet supported");
return Result::Success;
}
FileDescriptor CardSPIArchive::openFile(const FSPath& path, const FilePerms& perms) {
Helpers::panic("[Card SPI] OpenFile not yet supported");
return FileError;
}
Rust::Result<ArchiveBase*, HorizonResult> CardSPIArchive::openArchive(const FSPath& path) {
if (path.type != PathType::Empty) {
Helpers::panic("Unimplemented path type for CardSPIArchive::OpenArchive");
}
Helpers::warn("Unimplemented: Card SPI archive");
return Err(Result::FailurePlaceholder);
}
Rust::Result<DirectorySession, HorizonResult> CardSPIArchive::openDirectory(const FSPath& path) {
Helpers::panic("[Card SPI] OpenDirectory not yet supported");
return Err(Result::FailurePlaceholder);
}