filesystem: Add getter for BCAT temporary directory
This commit is contained in:
parent
c00ed8f4ff
commit
f2073217a4
|
@ -136,4 +136,9 @@ u64 BISFactory::GetFullNANDTotalSpace() const {
|
||||||
return static_cast<u64>(Settings::values.nand_total_size);
|
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
|
} // namespace FileSys
|
||||||
|
|
|
@ -61,6 +61,8 @@ public:
|
||||||
u64 GetUserNANDTotalSpace() const;
|
u64 GetUserNANDTotalSpace() const;
|
||||||
u64 GetFullNANDTotalSpace() const;
|
u64 GetFullNANDTotalSpace() const;
|
||||||
|
|
||||||
|
VirtualDir GetBCATDirectory(u64 title_id) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VirtualDir nand_root;
|
VirtualDir nand_root;
|
||||||
VirtualDir load_root;
|
VirtualDir load_root;
|
||||||
|
|
|
@ -674,6 +674,15 @@ FileSys::VirtualDir FileSystemController::GetModificationDumpRoot(u64 title_id)
|
||||||
return bis_factory->GetModificationDumpRoot(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) {
|
void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) {
|
||||||
if (overwrite) {
|
if (overwrite) {
|
||||||
bis_factory = nullptr;
|
bis_factory = nullptr;
|
||||||
|
|
Reference in New Issue