mirror of
https://github.com/edubart/otclient.git
synced 2025-12-26 17:57:11 +01:00
Remove boost::filesystem dependency
This commit is contained in:
@@ -79,6 +79,15 @@ std::string Platform::getTempPath()
|
||||
return "/tmp/";
|
||||
}
|
||||
|
||||
std::string Platform::getCurrentDir()
|
||||
{
|
||||
std::string res;
|
||||
char cwd[2048];
|
||||
if(getcwd(cwd, sizeof(cwd)) != NULL)
|
||||
res = cwd;
|
||||
return res;
|
||||
}
|
||||
|
||||
bool Platform::copyFile(std::string from, std::string to)
|
||||
{
|
||||
return system(stdext::format("/bin/cp '%s' '%s'", from, to).c_str()) == 0;
|
||||
|
||||
Reference in New Issue
Block a user