Reopen changed files
This commit is contained in:
@@ -262,6 +262,21 @@ bool DeleteFile(String path) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int64_t GetFileModTime(String file) {
|
||||
Scratch scratch;
|
||||
String16 string16 = ToString16(scratch, file);
|
||||
WIN32_FIND_DATAW data;
|
||||
HANDLE handle = FindFirstFileW(string16.data, &data);
|
||||
if (handle != INVALID_HANDLE_VALUE) {
|
||||
FindClose(handle);
|
||||
FILETIME time = data.ftLastWriteTime;
|
||||
int64_t result = (int64_t)time.dwHighDateTime << 32 | time.dwLowDateTime;
|
||||
return result;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
struct Win32Process {
|
||||
HANDLE handle;
|
||||
HANDLE child_stdout_read;
|
||||
|
||||
Reference in New Issue
Block a user