Remove boost::filesystem dependency

This commit is contained in:
Eduardo Bart
2013-02-22 19:29:58 -03:00
parent 09c937998f
commit 04c4943fa8
7 changed files with 26 additions and 9 deletions

View File

@@ -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;