summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-10 02:44:21 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-12 04:50:08 +0200
commitb70a831608caf78831e23575aa2fca19bf0d3491 (patch)
tree876952a5acc9d1d550feae4f904a919d94563f72 /src/common
parentcommon: Move hex string processing to separate file (diff)
downloadyuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.gz
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.bz2
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.lz
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.xz
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.tar.zst
yuzu-b70a831608caf78831e23575aa2fca19bf0d3491.zip
Diffstat (limited to 'src/common')
-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() {
#endif
}
+std::string GetNANDRegistrationDir(bool system) {
+ if (system)
+ return GetUserPath(UserPath::NANDDir) + "system/Contents/registered/";
+ return GetUserPath(UserPath::NANDDir) + "user/Contents/registered/";
+}
+
size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) {
return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size());
}
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 = "");
std::string GetHactoolConfigurationPath();
+std::string GetNANDRegistrationDir(bool system = false);
+
// Returns the path to where the sys file are
std::string GetSysDirectory();