Added ostd::Utils::getHomeDirPath function to <FileSystem.hpp>
This commit is contained in:
parent
7ca2fbf3f1
commit
d63db08081
3 changed files with 15 additions and 1 deletions
2
build.nr
2
build.nr
|
|
@ -1 +1 @@
|
||||||
1854
|
1855
|
||||||
|
|
|
||||||
|
|
@ -61,5 +61,18 @@ namespace ostd
|
||||||
list.push_back(file.path());
|
list.push_back(file.path());
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ostd::String Utils::getHomeDirPath(void)
|
||||||
|
{
|
||||||
|
ostd::String home_path = "";
|
||||||
|
#ifdef WINDOWS_OS
|
||||||
|
home_path = ostd::String(getenv("HOMEDRIVE")) + "\\" + ostd::String(getenv("HOMEPATH"));
|
||||||
|
#elif defined(LINUX_OS)
|
||||||
|
home_path = ostd::String(getenv("HOME"));
|
||||||
|
#else
|
||||||
|
home_path = "NULL";
|
||||||
|
#endif
|
||||||
|
return home_path;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +157,7 @@ namespace ostd
|
||||||
static std::vector<std::filesystem::path> listFilesInDirectoryRecursive(const String& directoryPath);
|
static std::vector<std::filesystem::path> listFilesInDirectoryRecursive(const String& directoryPath);
|
||||||
static std::vector<std::filesystem::path> listDirectoriesInDirectoryRecursive(const String& directoryPath);
|
static std::vector<std::filesystem::path> listDirectoriesInDirectoryRecursive(const String& directoryPath);
|
||||||
static std::vector<std::filesystem::path> listDirectoryRecursive(const String& directoryPath);
|
static std::vector<std::filesystem::path> listDirectoryRecursive(const String& directoryPath);
|
||||||
|
static ostd::String getHomeDirPath(void);
|
||||||
|
|
||||||
//Implemented in <ShuntingYard.cpp>
|
//Implemented in <ShuntingYard.cpp>
|
||||||
static int32_t solveIntegerExpression(const String& expr);
|
static int32_t solveIntegerExpression(const String& expr);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue