Просмотр исходного кода

sdmc_factory: Add accessor for content directory

Zach Hilman 7 лет назад
Родитель
Сommit
02b36b0eb5
2 измененных файлов с 7 добавлено и 0 удалено
  1. 4 0
      src/core/file_sys/sdmc_factory.cpp
  2. 3 0
      src/core/file_sys/sdmc_factory.h

+ 4 - 0
src/core/file_sys/sdmc_factory.cpp

@@ -22,6 +22,10 @@ ResultVal<VirtualDir> SDMCFactory::Open() {
     return MakeResult<VirtualDir>(dir);
 }
 
+VirtualDir SDMCFactory::GetSDMCContentDirectory() const {
+    return GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents");
+}
+
 RegisteredCache* SDMCFactory::GetSDMCContents() const {
     return contents.get();
 }

+ 3 - 0
src/core/file_sys/sdmc_factory.h

@@ -19,6 +19,9 @@ public:
     ~SDMCFactory();
 
     ResultVal<VirtualDir> Open();
+
+    VirtualDir GetSDMCContentDirectory() const;
+
     RegisteredCache* GetSDMCContents() const;
 
 private: