diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 3ce590062a0e878db977f6fa01d70ec7501e8b6c..b30a67ff99d055988b635b3b4a3668c4866d057f 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 2711872ae401f8d1f12ce4e32625dde5ad67242e..2f13d0b6bb7ccd903bc8aabde6f3a9322debe1e3 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();