mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
filesystem: Add getter for BCAT temporary directory
This commit is contained in:
parent
c00ed8f4ff
commit
f2073217a4
3 changed files with 16 additions and 0 deletions
|
@ -136,4 +136,9 @@ u64 BISFactory::GetFullNANDTotalSpace() const {
|
|||
return static_cast<u64>(Settings::values.nand_total_size);
|
||||
}
|
||||
|
||||
VirtualDir BISFactory::GetBCATDirectory(u64 title_id) const {
|
||||
return GetOrCreateDirectoryRelative(nand_root,
|
||||
fmt::format("/system/save/bcat/{:016X}", title_id));
|
||||
}
|
||||
|
||||
} // namespace FileSys
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
u64 GetUserNANDTotalSpace() const;
|
||||
u64 GetFullNANDTotalSpace() const;
|
||||
|
||||
VirtualDir GetBCATDirectory(u64 title_id) const;
|
||||
|
||||
private:
|
||||
VirtualDir nand_root;
|
||||
VirtualDir load_root;
|
||||
|
|
|
@ -674,6 +674,15 @@ FileSys::VirtualDir FileSystemController::GetModificationDumpRoot(u64 title_id)
|
|||
return bis_factory->GetModificationDumpRoot(title_id);
|
||||
}
|
||||
|
||||
FileSys::VirtualDir GetBCATDirectory(u64 title_id) {
|
||||
LOG_TRACE(Service_FS, "Opening BCAT root for tid={:016X}", title_id);
|
||||
|
||||
if (bis_factory == nullptr)
|
||||
return nullptr;
|
||||
|
||||
return bis_factory->GetBCATDirectory(title_id);
|
||||
}
|
||||
|
||||
void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) {
|
||||
if (overwrite) {
|
||||
bis_factory = nullptr;
|
||||
|
|
Loading…
Reference in a new issue