mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 11:41:46 +02:00
- added purge file stats and bugfix when showing help on commandline
This commit is contained in:
@@ -156,7 +156,7 @@ string replaceAll(string& context, const string& from, const string& to);
|
||||
bool removeFile(string file);
|
||||
bool renameFile(string oldFile, string newFile);
|
||||
void removeFolder(const string path);
|
||||
long getFileSize(string filename);
|
||||
off_t getFileSize(string filename);
|
||||
|
||||
int getScreenW();
|
||||
int getScreenH();
|
||||
|
@@ -1433,10 +1433,12 @@ bool renameFile(string oldFile, string newFile) {
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
long getFileSize(string filename) {
|
||||
off_t getFileSize(string filename) {
|
||||
struct stat stbuf;
|
||||
stat(filename.c_str(), &stbuf);
|
||||
return stbuf.st_size;
|
||||
if(stat(filename.c_str(), &stbuf) != -1) {
|
||||
return stbuf.st_size;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =====================================
|
||||
|
Reference in New Issue
Block a user