aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/utime.cpp
blob: 44135e9b42b5a7fe58d3838e8f1c04e88216d12f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "../system/utime.h" 
 
#ifdef _MSC_VER 
    #include <sys/utime.h> 
#else 
    #define HDR <../include/utime.h> 
    #include <sys/types.h> 
    #include HDR 
#endif 
 
int TouchFile(const char* filePath) { 
    return utime(filePath, nullptr);
} 
 
int SetModTime(const char* filePath, time_t modtime, time_t actime) { 
    struct utimbuf buf; 
    buf.modtime = modtime; 
    buf.actime = actime; 
    return utime(filePath, &buf); 
}