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 GetDirectoryLastModifiedTime(this IFileSystemOperator fileSystemOperator, string directoryPath) { var lastModifiedTimeUTC = fileSystemOperator.GetDirectoryLastModifiedTimeUTC(directoryPath); var lastModifiedTime = lastModifiedTimeUTC.ToLocalTime(); return(lastModifiedTime); }