[FS] Better GetFormatInfo
This commit is contained in:
@@ -204,10 +204,11 @@ public:
|
||||
virtual u64 getFreeBytes() = 0;
|
||||
virtual FSResult createFile(const FSPath& path, u64 size) = 0;
|
||||
virtual FSResult deleteFile(const FSPath& path) = 0;
|
||||
virtual FormatInfo getFormatInfo(const FSPath& path) {
|
||||
|
||||
virtual Rust::Result<FormatInfo, FSResult> getFormatInfo(const FSPath& path) {
|
||||
Helpers::panic("Unimplemented GetFormatInfo for %s archive", name().c_str());
|
||||
// Return a dummy struct just to avoid the UB of not returning anything, even if we panic
|
||||
return FormatInfo{ .size = 0, .numOfDirectories = 0, .numOfFiles = 0, .duplicateData = false };
|
||||
return Ok(FormatInfo{ .size = 0, .numOfDirectories = 0, .numOfFiles = 0, .duplicateData = false });
|
||||
}
|
||||
|
||||
virtual FSResult createDirectory(const FSPath& path) {
|
||||
|
||||
Reference in New Issue
Block a user