public static DateTime GetLastModifiedTimeUTC(this IFileSystemOperator fileSystemOperator, string path) { var output = fileSystemOperator.FileOrDirectorySwitch(path, () => fileSystemOperator.GetFileLastModifiedTimeUTC(path), () => fileSystemOperator.GetDirectoryLastModifiedTimeUTC(path)); return(output); }
public static DateTime GetFileLastModifiedTime(this IFileSystemOperator fileSystemOperator, string filePath) { var lastModifiedTimeUTC = fileSystemOperator.GetFileLastModifiedTimeUTC(filePath); var lastModifiedTime = lastModifiedTimeUTC.ToLocalTime(); return(lastModifiedTime); }