summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Subv2015-01-13 23:56:00 -0500
committerGravatar Subv2015-01-24 15:44:40 -0500
commitc2e9990149fc0b5ef937adf24285eb7cc7526893 (patch)
treea3d8d671f45ef0b17f5c247e03dbf4b13347b4c2 /src/core/file_sys
parentMerge pull request #493 from archshift/ptmplay (diff)
downloadyuzu-c2e9990149fc0b5ef937adf24285eb7cc7526893.tar.gz
yuzu-c2e9990149fc0b5ef937adf24285eb7cc7526893.tar.xz
yuzu-c2e9990149fc0b5ef937adf24285eb7cc7526893.zip
Services: Stubbed more services.
Implemented FSUser::CreateExtSaveData
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/archive_extsavedata.cpp4
-rw-r--r--src/core/file_sys/archive_extsavedata.h17
2 files changed, 19 insertions, 2 deletions
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp
index 0805f42ae..33e4e76f8 100644
--- a/src/core/file_sys/archive_extsavedata.cpp
+++ b/src/core/file_sys/archive_extsavedata.cpp
@@ -17,7 +17,7 @@
17 17
18namespace FileSys { 18namespace FileSys {
19 19
20static std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) { 20std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) {
21 std::vector<u8> vec_data = path.AsBinary(); 21 std::vector<u8> vec_data = path.AsBinary();
22 const u32* data = reinterpret_cast<const u32*>(vec_data.data()); 22 const u32* data = reinterpret_cast<const u32*>(vec_data.data());
23 u32 save_low = data[1]; 23 u32 save_low = data[1];
@@ -25,7 +25,7 @@ static std::string GetExtSaveDataPath(const std::string& mount_point, const Path
25 return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low); 25 return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low);
26} 26}
27 27
28static std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) { 28std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) {
29 if (shared) 29 if (shared)
30 return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str()); 30 return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str());
31 31
diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h
index fb7f209d2..802a11b5f 100644
--- a/src/core/file_sys/archive_extsavedata.h
+++ b/src/core/file_sys/archive_extsavedata.h
@@ -42,4 +42,21 @@ protected:
42 std::string concrete_mount_point; 42 std::string concrete_mount_point;
43}; 43};
44 44
45/**
46 * Constructs a path to the concrete ExtData archive in the host filesystem based on the
47 * input Path and base mount point.
48 * @param mount_point The base mount point of the ExtSaveData archives.
49 * @param path The path that identifies the requested concrete ExtSaveData archive.
50 * @returns The complete path to the specified extdata archive in the host filesystem
51 */
52std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path);
53
54/**
55 * Constructs a path to the base folder to hold concrete ExtSaveData archives in the host file system.
56 * @param mount_point The base folder where this folder resides, ie. SDMC or NAND.
57 * @param shared Whether this ExtSaveData container is for SharedExtSaveDatas or not.
58 * @returns The path to the base ExtSaveData archives' folder in the host file system
59 */
60std::string GetExtDataContainerPath(const std::string& mount_point, bool shared);
61
45} // namespace FileSys 62} // namespace FileSys