diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-09 20:44:21 -0400 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-11 22:50:08 -0400 |
commit | b70a831608caf78831e23575aa2fca19bf0d3491 (patch) | |
tree | 876952a5acc9d1d550feae4f904a919d94563f72 /src/common/file_util.cpp | |
parent | 10aac376d1d0fccb5b993bd3f95db42de0ceba12 (diff) |
file_util: Add getter for NAND registration directory
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r-- | src/common/file_util.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 3ce590062a..b30a67ff99 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()); } |