diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs index 59d222bb9..cf90651bc 100644 --- a/src/Renci.SshNet/SftpClient.cs +++ b/src/Renci.SshNet/SftpClient.cs @@ -1506,10 +1506,11 @@ public IEnumerable ReadLines(string path, Encoding encoding) /// /// The file for which to set the access date and time information. /// A containing the value to set for the last access date and time of path. This value is expressed in local time. - [Obsolete("Note: This method currently throws NotImplementedException because it has not yet been implemented.")] public void SetLastAccessTime(string path, DateTime lastAccessTime) { - throw new NotImplementedException(); + var attribs = GetAttributes(path); + attribs.LastAccessTime = lastAccessTime; + SetAttributes(path, attribs); } /// @@ -1528,10 +1529,11 @@ public void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc) /// /// The file for which to set the date and time information. /// A containing the value to set for the last write date and time of path. This value is expressed in local time. - [Obsolete("Note: This method currently throws NotImplementedException because it has not yet been implemented.")] public void SetLastWriteTime(string path, DateTime lastWriteTime) { - throw new NotImplementedException(); + var attribs = GetAttributes(path); + attribs.LastWriteTime = lastWriteTime; + SetAttributes(path, attribs); } ///