public void SetCreationTime(string path, DateTime creationTime) { Guard.NotNull(path, nameof(path)); AbsolutePath absolutePath = owner.ToAbsolutePath(path); var handler = new DirectorySetTimeHandler(container); var arguments = new EntrySetTimeArguments(absolutePath, FileTimeKind.CreationTime, false, creationTime); handler.Handle(arguments); }
public void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc) { Guard.NotNull(path, nameof(path)); AbsolutePath absolutePath = owner.ToAbsolutePath(path); var handler = new DirectorySetTimeHandler(container); var arguments = new EntrySetTimeArguments(absolutePath, FileTimeKind.LastWriteTime, true, lastWriteTimeUtc); handler.Handle(arguments); }
public void SetLastAccessTime(string path, DateTime lastAccessTime) { Guard.NotNull(path, nameof(path)); AbsolutePath absolutePath = owner.ToAbsolutePath(path); var handler = new DirectorySetTimeHandler(root); var arguments = new EntrySetTimeArguments(absolutePath, FileTimeKind.LastAccessTime, false, lastAccessTime); handler.Handle(arguments); }