16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-09-01 12:49:18 +02:00

Merge branch 'mover_in_c++' of https://github.com/tmj-fstate/maszyna into tmj-fstate-mover_in_c++

This commit is contained in:
milek7
2017-11-03 20:31:20 +01:00
35 changed files with 442 additions and 467 deletions

View File

@@ -294,10 +294,13 @@ bool FileExists( std::string const &Filename ) {
}
// returns time of last modification for specified file
time_t
std::time_t
last_modified( std::string const &Filename ) {
std::string fn = Filename;
std::replace(fn.begin(), fn.end(), '\\', '/');
struct stat filestat;
if( ::stat( Filename.c_str(), &filestat ) == 0 ) { return filestat.st_mtime; }
else { return 0; }
if( ::stat( fn.c_str(), &filestat ) == 0 )
return filestat.st_mtime;
else
return 0;
}