[FS] Add CreateDirectory for MK7 (hopefully not broken)
This commit is contained in:
@@ -208,6 +208,11 @@ public:
|
||||
return FormatInfo{ .size = 0, .numOfDirectories = 0, .numOfFiles = 0, .duplicateData = false };
|
||||
}
|
||||
|
||||
virtual FSResult createDirectory(const FSPath& path) {
|
||||
Helpers::panic("Unimplemented CreateDirectory for %s archive", name().c_str());
|
||||
return FSResult::AlreadyExists;
|
||||
}
|
||||
|
||||
// Returns nullopt if opening the file failed, otherwise returns a file descriptor to it (nullptr if none is needed)
|
||||
virtual FileDescriptor openFile(const FSPath& path, const FilePerms& perms) = 0;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ public:
|
||||
u64 getFreeBytes() override { Helpers::panic("SaveData::GetFreeBytes unimplemented"); return 0; }
|
||||
std::string name() override { return "SaveData"; }
|
||||
|
||||
FSResult createDirectory(const FSPath& path) override;
|
||||
FSResult createFile(const FSPath& path, u64 size) override;
|
||||
FSResult deleteFile(const FSPath& path) override;
|
||||
FormatInfo getFormatInfo(const FSPath& path) override;
|
||||
|
||||
@@ -37,6 +37,7 @@ class FSService {
|
||||
FSPath readPath(u32 type, u32 pointer, u32 size);
|
||||
|
||||
// Service commands
|
||||
void createDirectory(u32 messagePointer);
|
||||
void createFile(u32 messagePointer);
|
||||
void closeArchive(u32 messagePointer);
|
||||
void controlArchive(u32 messagePointer);
|
||||
|
||||
Reference in New Issue
Block a user