Skip to content

Commit cd1151d

Browse files
Update ISftpClient for #120 (#1193)
1 parent f28c2c2 commit cd1151d

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

src/Renci.SshNet/ISftpClient.cs

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public interface ISftpClient : IBaseClient, IDisposable
239239
/// </returns>
240240
/// <exception cref="ArgumentNullException"><paramref name="sourcePath"/> is <c>null</c>.</exception>
241241
/// <exception cref="ArgumentException"><paramref name="destinationPath"/> is <c>null</c> or contains only whitespace.</exception>
242+
/// <exception cref="SshException">If a problem occurs while copying the file</exception>
242243
IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, AsyncCallback asyncCallback, object state);
243244

244245
/// <summary>
@@ -338,7 +339,7 @@ public interface ISftpClient : IBaseClient, IDisposable
338339
/// </para>
339340
/// <para>
340341
/// When <paramref name="path"/> refers to an existing file, set <paramref name="canOverride"/> to <c>true</c> to overwrite and truncate that file.
341-
/// If <paramref name="canOverride"/> is <c>false</c>, the upload will fail and <see cref="EndUploadFile(IAsyncResult)"/> will throw an
342+
/// If <paramref name="canOverride"/> is <c>false</c>, the upload will fail and <see cref="SftpClient.EndUploadFile(IAsyncResult)"/> will throw an
342343
/// <see cref="SshException"/>.
343344
/// </para>
344345
/// </remarks>
@@ -515,7 +516,7 @@ public interface ISftpClient : IBaseClient, IDisposable
515516
/// <exception cref="ArgumentException"><paramref name="path" /> is <b>null</b> or contains only whitespace characters.</exception>
516517
/// <exception cref="SshConnectionException">Client is not connected.</exception>
517518
/// <exception cref="SftpPermissionDeniedException">Permission to perform the operation was denied by the remote host. <para>-or-</para> A SSH command was denied by the server.</exception>
518-
/// <exception cref="SftpPathNotFoundException"><paramref name="path"/> was not found on the remote host.</exception>///
519+
/// <exception cref="SftpPathNotFoundException"><paramref name="path"/> was not found on the remote host.</exception>///
519520
/// <exception cref="SshException">A SSH error where <see cref="Exception.Message" /> is the message from the remote host.</exception>
520521
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
521522
/// <remarks>
@@ -527,7 +528,7 @@ public interface ISftpClient : IBaseClient, IDisposable
527528
/// Ends an asynchronous file downloading into the stream.
528529
/// </summary>
529530
/// <param name="asyncResult">The pending asynchronous SFTP request.</param>
530-
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="EndDownloadFile(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
531+
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="SftpClient.EndDownloadFile(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
531532
/// <exception cref="SshConnectionException">Client is not connected.</exception>
532533
/// <exception cref="SftpPermissionDeniedException">Permission to perform the operation was denied by the remote host. <para>-or-</para> A SSH command was denied by the server.</exception>
533534
/// <exception cref="SftpPathNotFoundException">The path was not found on the remote host.</exception>
@@ -541,7 +542,7 @@ public interface ISftpClient : IBaseClient, IDisposable
541542
/// <returns>
542543
/// A list of files.
543544
/// </returns>
544-
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="EndListDirectory(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
545+
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="SftpClient.EndListDirectory(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
545546
IEnumerable<ISftpFile> EndListDirectory(IAsyncResult asyncResult);
546547

547548
/// <summary>
@@ -551,15 +552,15 @@ public interface ISftpClient : IBaseClient, IDisposable
551552
/// <returns>
552553
/// A list of uploaded files.
553554
/// </returns>
554-
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="EndSynchronizeDirectories(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
555+
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="SftpClient.EndSynchronizeDirectories(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
555556
/// <exception cref="SftpPathNotFoundException">The destination path was not found on the remote host.</exception>
556557
IEnumerable<FileInfo> EndSynchronizeDirectories(IAsyncResult asyncResult);
557558

558559
/// <summary>
559560
/// Ends an asynchronous uploading the stream into remote file.
560561
/// </summary>
561562
/// <param name="asyncResult">The pending asynchronous SFTP request.</param>
562-
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="EndUploadFile(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
563+
/// <exception cref="ArgumentException">The <see cref="IAsyncResult"/> object did not come from the corresponding async method on this type.<para>-or-</para><see cref="SftpClient.EndUploadFile(IAsyncResult)"/> was called multiple times with the same <see cref="IAsyncResult"/>.</exception>
563564
/// <exception cref="SshConnectionException">Client is not connected.</exception>
564565
/// <exception cref="SftpPathNotFoundException">The directory of the file was not found on the remote host.</exception>
565566
/// <exception cref="SftpPermissionDeniedException">Permission to upload the file was denied by the remote host. <para>-or-</para> A SSH command was denied by the server.</exception>
@@ -925,6 +926,34 @@ public interface ISftpClient : IBaseClient, IDisposable
925926
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
926927
void RenameFile(string oldPath, string newPath, bool isPosix);
927928

929+
/// <summary>
930+
/// Sets the date and time the specified file was last accessed.
931+
/// </summary>
932+
/// <param name="path">The file for which to set the access date and time information.</param>
933+
/// <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>
934+
void SetLastAccessTime(string path, DateTime lastAccessTime);
935+
936+
/// <summary>
937+
/// Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.
938+
/// </summary>
939+
/// <param name="path">The file for which to set the access date and time information.</param>
940+
/// <param name="lastAccessTimeUtc">A <see cref="DateTime"/> containing the value to set for the last access date and time of path. This value is expressed in UTC time.</param>
941+
void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc);
942+
943+
/// <summary>
944+
/// Sets the date and time that the specified file was last written to.
945+
/// </summary>
946+
/// <param name="path">The file for which to set the date and time information.</param>
947+
/// <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>
948+
void SetLastWriteTime(string path, DateTime lastWriteTime);
949+
950+
/// <summary>
951+
/// Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
952+
/// </summary>
953+
/// <param name="path">The file for which to set the date and time information.</param>
954+
/// <param name="lastWriteTimeUtc">A <see cref="DateTime"/> containing the value to set for the last write date and time of path. This value is expressed in UTC time.</param>
955+
void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc);
956+
928957
/// <summary>
929958
/// Sets the specified <see cref="SftpFileAttributes"/> of the file on the specified path.
930959
/// </summary>
@@ -959,6 +988,7 @@ public interface ISftpClient : IBaseClient, IDisposable
959988
/// <exception cref="ArgumentNullException"><paramref name="sourcePath"/> is <c>null</c>.</exception>
960989
/// <exception cref="ArgumentException"><paramref name="destinationPath"/> is <c>null</c> or contains only whitespace.</exception>
961990
/// <exception cref="SftpPathNotFoundException"><paramref name="destinationPath"/> was not found on the remote host.</exception>
991+
/// <exception cref="SshException">If a problem occurs while copying the file</exception>
962992
IEnumerable<FileInfo> SynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern);
963993

964994
/// <summary>

0 commit comments

Comments
 (0)