From 99adc4de8bdccf528fbff382f9559c6392bb610e Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Wed, 28 Sep 2011 14:16:31 +0000 Subject: [PATCH] Make LastWriteTime and LastAccessTime properties updatable --- Renci.SshClient/Renci.SshNet/Sftp/SftpFile.cs | 8 ++++++++ Renci.SshClient/Renci.SshNet/Sftp/SftpFileAttributes.cs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Renci.SshClient/Renci.SshNet/Sftp/SftpFile.cs b/Renci.SshClient/Renci.SshNet/Sftp/SftpFile.cs index 6508c2c1..0781553f 100644 --- a/Renci.SshClient/Renci.SshNet/Sftp/SftpFile.cs +++ b/Renci.SshClient/Renci.SshNet/Sftp/SftpFile.cs @@ -64,6 +64,10 @@ namespace Renci.SshNet.Sftp { return this.Attributes.LastAccessTime; } + set + { + this.Attributes.LastAccessTime = value; + } } /// @@ -78,6 +82,10 @@ namespace Renci.SshNet.Sftp { return this.Attributes.LastWriteTime; } + set + { + this.Attributes.LastWriteTime = value; + } } /// diff --git a/Renci.SshClient/Renci.SshNet/Sftp/SftpFileAttributes.cs b/Renci.SshClient/Renci.SshNet/Sftp/SftpFileAttributes.cs index 9b646942..87556a99 100644 --- a/Renci.SshClient/Renci.SshNet/Sftp/SftpFileAttributes.cs +++ b/Renci.SshClient/Renci.SshNet/Sftp/SftpFileAttributes.cs @@ -66,7 +66,7 @@ namespace Renci.SshNet.Sftp /// /// The time that the current file or directory was last accessed. /// - public DateTime LastAccessTime { get; private set; } + public DateTime LastAccessTime { get; set; } /// /// Gets or sets the time when the current file or directory was last written to. @@ -74,7 +74,7 @@ namespace Renci.SshNet.Sftp /// /// The time the current file was last written. /// - public DateTime LastWriteTime { get; private set; } + public DateTime LastWriteTime { get; set; } /// /// Gets or sets the size, in bytes, of the current file.