Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SetLastAccessTime, SetLastWriteTime #217

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Renci.SshNet/SftpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,10 +1506,11 @@ public IEnumerable<string> ReadLines(string path, Encoding encoding)
/// </summary>
/// <param name="path">The file for which to set the access date and time information.</param>
/// <param name="lastAccessTime">A <see cref="DateTime"/> containing the value to set for the last access date and time of path. This value is expressed in local time.</param>
[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);
}

/// <summary>
Expand All @@ -1528,10 +1529,11 @@ public void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc)
/// </summary>
/// <param name="path">The file for which to set the date and time information.</param>
/// <param name="lastWriteTime">A <see cref="DateTime"/> containing the value to set for the last write date and time of path. This value is expressed in local time.</param>
[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);
}

/// <summary>
Expand Down