yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

filesystem: Add getter for BCAT temporary directory

This commit is contained in:
Zach Hilman 2019-04-28 18:42:36 -04:00
parent c00ed8f4ff
commit f2073217a4
3 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -61,6 +61,8 @@ public:
u64 GetUserNANDTotalSpace() const;
u64 GetFullNANDTotalSpace() const;
VirtualDir GetBCATDirectory(u64 title_id) const;
private:
VirtualDir nand_root;
VirtualDir load_root;

View File

@ -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;