From 02b36b0eb564f60b751398f5e7e89e75e05c1c20 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 10 Apr 2019 12:31:41 -0400 Subject: sdmc_factory: Add accessor for content directory --- src/core/file_sys/sdmc_factory.cpp | 4 ++++ src/core/file_sys/sdmc_factory.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp index bd3a57058..e5668d70e 100644 --- a/src/core/file_sys/sdmc_factory.cpp +++ b/src/core/file_sys/sdmc_factory.cpp @@ -22,6 +22,10 @@ ResultVal SDMCFactory::Open() { return MakeResult(dir); } +VirtualDir SDMCFactory::GetSDMCContentDirectory() const { + return GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents"); +} + RegisteredCache* SDMCFactory::GetSDMCContents() const { return contents.get(); } diff --git a/src/core/file_sys/sdmc_factory.h b/src/core/file_sys/sdmc_factory.h index 42794ba5b..a98e44f85 100644 --- a/src/core/file_sys/sdmc_factory.h +++ b/src/core/file_sys/sdmc_factory.h @@ -19,6 +19,9 @@ public: ~SDMCFactory(); ResultVal Open(); + + VirtualDir GetSDMCContentDirectory() const; + RegisteredCache* GetSDMCContents() const; private: -- cgit v1.2.3