public void GetLastWriteDirectoryUtcTimeReturnsMinValueForFile() { string file = FileUtilities.GetTemporaryFile(); DateTime directoryTime; Assert.False(NativeMethodsShared.GetLastWriteDirectoryUtcTime(file, out directoryTime)); Assert.Equal(DateTime.MinValue, directoryTime); }
public override DateTime GetLastWriteTimeUtc(string path) { var fileLastWriteTime = NativeMethodsShared.GetLastWriteFileUtcTime(path); if (fileLastWriteTime != DateTime.MinValue) { return(fileLastWriteTime); } else { NativeMethodsShared.GetLastWriteDirectoryUtcTime(path, out var directoryLastWriteTime); return(directoryLastWriteTime); } }