From 4dae5a52a832cc3c4679aba80fd8b15c56ded93a Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 10 Apr 2019 12:08:39 -0400 Subject: [PATCH] bis_factory: Add accessors for BIS content directories --- src/core/file_sys/bis_factory.cpp | 8 ++++++++ src/core/file_sys/bis_factory.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/core/file_sys/bis_factory.cpp b/src/core/file_sys/bis_factory.cpp index 70a04f6a09..be737b9adc 100644 --- a/src/core/file_sys/bis_factory.cpp +++ b/src/core/file_sys/bis_factory.cpp @@ -18,6 +18,14 @@ BISFactory::BISFactory(VirtualDir nand_root_, VirtualDir load_root_, VirtualDir BISFactory::~BISFactory() = default; +VirtualDir BISFactory::GetSystemNANDContentDirectory() const { + return GetOrCreateDirectoryRelative(nand_root, "/system/Contents"); +} + +VirtualDir BISFactory::GetUserNANDContentDirectory() const { + return GetOrCreateDirectoryRelative(nand_root, "/user/Contents"); +} + RegisteredCache* BISFactory::GetSystemNANDContents() const { return sysnand_cache.get(); } diff --git a/src/core/file_sys/bis_factory.h b/src/core/file_sys/bis_factory.h index f8413d4ef0..bfebceeaf5 100644 --- a/src/core/file_sys/bis_factory.h +++ b/src/core/file_sys/bis_factory.h @@ -37,6 +37,9 @@ public: explicit BISFactory(VirtualDir nand_root, VirtualDir load_root, VirtualDir dump_root); ~BISFactory(); + VirtualDir GetSystemNANDContentDirectory() const; + VirtualDir GetUserNANDContentDirectory() const; + RegisteredCache* GetSystemNANDContents() const; RegisteredCache* GetUserNANDContents() const;