public static void FixTimestamp(FileSystemInfo path, DateTime fileTime, IOErrorDelegaty delegaty) { try { path.CreationTime = fileTime; path.LastAccessTime = fileTime; path.LastWriteTime = fileTime; } catch (Exception e) { delegaty?.Invoke(e, path); } }
public static void FixTimestamp(FileSystemInfo path, IOErrorDelegaty delegaty) => FixTimestamp(path, DefaultTimestamp, delegaty);