summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-08-09 20:44:21 -0400
committerGravatar Zach Hilman2018-08-11 22:50:08 -0400
commitb70a831608caf78831e23575aa2fca19bf0d3491 (patch)
tree876952a5acc9d1d550feae4f904a919d94563f72 /src
parentcommon: Move hex string processing to separate file (diff)
downloadyuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.gz
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.xz
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.zip
file_util: Add getter for NAND registration directory
Diffstat (limited to 'src')
-rw-r--r--src/common/file_util.cpp6
-rw-r--r--src/common/file_util.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 3ce590062..b30a67ff9 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -750,6 +750,12 @@ std::string GetHactoolConfigurationPath() {
750#endif 750#endif
751} 751}
752 752
753std::string GetNANDRegistrationDir(bool system) {
754 if (system)
755 return GetUserPath(UserPath::NANDDir) + "system/Contents/registered/";
756 return GetUserPath(UserPath::NANDDir) + "user/Contents/registered/";
757}
758
753size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) { 759size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) {
754 return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); 760 return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size());
755} 761}
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 2711872ae..2f13d0b6b 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -129,6 +129,8 @@ const std::string& GetUserPath(UserPath path, const std::string& new_path = "");
129 129
130std::string GetHactoolConfigurationPath(); 130std::string GetHactoolConfigurationPath();
131 131
132std::string GetNANDRegistrationDir(bool system = false);
133
132// Returns the path to where the sys file are 134// Returns the path to where the sys file are
133std::string GetSysDirectory(); 135std::string GetSysDirectory();
134 136