Adds a Downloader component to JGE able to download and cache files.

This commit is contained in:
xawotihs
2014-01-12 22:16:35 +01:00
parent dec1caa43c
commit 25955303e7
6 changed files with 452 additions and 13 deletions

View File

@@ -557,7 +557,13 @@ bool JFileSystem::Rename(string _from, string _to)
string from = mUserFSPath + _from;
string to = mUserFSPath + _to;
std::remove(to.c_str());
return rename(from.c_str(), to.c_str()) ? true: false;
return (rename(from.c_str(), to.c_str()) == 0);
}
bool JFileSystem::Remove(string aFile)
{
string toRemove = mUserFSPath + aFile;
return (std::remove(toRemove.c_str()) == 0);
}
int JFileSystem::GetFileSize(izfstream & file)