From 9ea37f951864cb765ef73130341a85f0103bad6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Nag=C3=B3rski?= Date: Fri, 29 Sep 2023 09:04:50 +0200 Subject: [PATCH] Update ISftpClient for #120 --- src/Renci.SshNet/ISftpClient.cs | 42 ++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/Renci.SshNet/ISftpClient.cs b/src/Renci.SshNet/ISftpClient.cs index 21d05ae7c..29f958d9f 100644 --- a/src/Renci.SshNet/ISftpClient.cs +++ b/src/Renci.SshNet/ISftpClient.cs @@ -239,6 +239,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// /// is null. /// is null or contains only whitespace. + /// If a problem occurs while copying the file IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, AsyncCallback asyncCallback, object state); /// @@ -338,7 +339,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// /// /// When refers to an existing file, set to true to overwrite and truncate that file. - /// If is false, the upload will fail and will throw an + /// If is false, the upload will fail and will throw an /// . /// /// @@ -515,7 +516,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// is null or contains only whitespace characters. /// Client is not connected. /// Permission to perform the operation was denied by the remote host. -or- A SSH command was denied by the server. - /// was not found on the remote host./// + /// was not found on the remote host./// /// A SSH error where is the message from the remote host. /// The method was called after the client was disposed. /// @@ -527,7 +528,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// Ends an asynchronous file downloading into the stream. /// /// The pending asynchronous SFTP request. - /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . + /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . /// Client is not connected. /// Permission to perform the operation was denied by the remote host. -or- A SSH command was denied by the server. /// The path was not found on the remote host. @@ -541,7 +542,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// /// A list of files. /// - /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . + /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . IEnumerable EndListDirectory(IAsyncResult asyncResult); /// @@ -551,7 +552,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// /// A list of uploaded files. /// - /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . + /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . /// The destination path was not found on the remote host. IEnumerable EndSynchronizeDirectories(IAsyncResult asyncResult); @@ -559,7 +560,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// Ends an asynchronous uploading the stream into remote file. /// /// The pending asynchronous SFTP request. - /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . + /// The object did not come from the corresponding async method on this type.-or- was called multiple times with the same . /// Client is not connected. /// The directory of the file was not found on the remote host. /// Permission to upload the file was denied by the remote host. -or- A SSH command was denied by the server. @@ -925,6 +926,34 @@ public interface ISftpClient : IBaseClient, IDisposable /// The method was called after the client was disposed. void RenameFile(string oldPath, string newPath, bool isPosix); + /// + /// Sets the date and time the specified file was last accessed. + /// + /// 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. + void SetLastAccessTime(string path, DateTime lastAccessTime); + + /// + /// Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed. + /// + /// 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 UTC time. + void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc); + + /// + /// Sets the date and time that the specified file was last written to. + /// + /// 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. + void SetLastWriteTime(string path, DateTime lastWriteTime); + + /// + /// Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to. + /// + /// 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 UTC time. + void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc); + /// /// Sets the specified of the file on the specified path. /// @@ -959,6 +988,7 @@ public interface ISftpClient : IBaseClient, IDisposable /// is null. /// is null or contains only whitespace. /// was not found on the remote host. + /// If a problem occurs while copying the file IEnumerable SynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern); ///