You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Renci.SshNet/ISftpClient.cs
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -491,6 +491,18 @@ public interface ISftpClient : IBaseClient, IDisposable
491
491
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
492
492
voidDeleteFile(stringpath);
493
493
494
+
/// <summary>
495
+
/// Deletes remote symbolic link specified by path.
496
+
/// </summary>
497
+
/// <param name="path">File to be deleted path.</param>
498
+
/// <exception cref="ArgumentException"><paramref name="path"/> is <b>null</b> or contains only whitespace characters.</exception>
499
+
/// <exception cref="SshConnectionException">Client is not connected.</exception>
500
+
/// <exception cref="SftpPathNotFoundException"><paramref name="path"/> was not found on the remote host.</exception>
501
+
/// <exception cref="SftpPermissionDeniedException">Permission to delete the file was denied by the remote host. <para>-or-</para> A SSH command was denied by the server.</exception>
502
+
/// <exception cref="SshException">A SSH error where <see cref="Exception.Message"/> is the message from the remote host.</exception>
503
+
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
504
+
voidDeleteSymbolicLink(stringpath);
505
+
494
506
/// <summary>
495
507
/// Asynchronously deletes remote file specified by path.
496
508
/// </summary>
@@ -580,6 +592,20 @@ public interface ISftpClient : IBaseClient, IDisposable
580
592
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
581
593
boolExists(stringpath);
582
594
595
+
/// <summary>
596
+
/// Checks whether symbolic link exists;
597
+
/// </summary>
598
+
/// <param name="path">The path.</param>
599
+
/// <returns>
600
+
/// <c>true</c> if directory or file exists; otherwise <c>false</c>.
601
+
/// </returns>
602
+
/// <exception cref="ArgumentException"><paramref name="path"/> is <b>null</b> or contains only whitespace characters.</exception>
603
+
/// <exception cref="SshConnectionException">Client is not connected.</exception>
604
+
/// <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>
605
+
/// <exception cref="SshException">A SSH error where <see cref="Exception.Message"/> is the message from the remote host.</exception>
606
+
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
607
+
boolSymbolicLinkExists(stringpath);
608
+
583
609
/// <summary>
584
610
/// Gets reference to remote file or directory.
585
611
/// </summary>
@@ -593,6 +619,19 @@ public interface ISftpClient : IBaseClient, IDisposable
593
619
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
594
620
ISftpFileGet(stringpath);
595
621
622
+
/// <summary>
623
+
/// Gets reference to remote symbolic link.
624
+
/// </summary>
625
+
/// <param name="path">The path.</param>
626
+
/// <returns>
627
+
/// A reference to <see cref="ISftpFile"/> file object.
628
+
/// </returns>
629
+
/// <exception cref="SshConnectionException">Client is not connected.</exception>
630
+
/// <exception cref="SftpPathNotFoundException"><paramref name="path"/> was not found on the remote host.</exception>
631
+
/// <exception cref="ArgumentNullException"><paramref name="path" /> is <b>null</b>.</exception>
632
+
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
633
+
ISftpFileGetSymbolicLink(stringpath);
634
+
596
635
/// <summary>
597
636
/// Gets the <see cref="SftpFileAttributes"/> of the file on the path.
@@ -793,6 +825,45 @@ public bool Exists(string path)
793
825
}
794
826
}
795
827
828
+
/// <summary>
829
+
/// Checks whether symbolic link exists;
830
+
/// </summary>
831
+
/// <param name="path">The path.</param>
832
+
/// <returns>
833
+
/// <c>true</c> if directory or file exists; otherwise <c>false</c>.
834
+
/// </returns>
835
+
/// <exception cref="ArgumentException"><paramref name="path"/> is <b>null</b> or contains only whitespace characters.</exception>
836
+
/// <exception cref="SshConnectionException">Client is not connected.</exception>
837
+
/// <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>
838
+
/// <exception cref="SshException">A SSH error where <see cref="Exception.Message"/> is the message from the remote host.</exception>
839
+
/// <exception cref="ObjectDisposedException">The method was called after the client was disposed.</exception>
840
+
publicboolSymbolicLinkExists(stringpath)
841
+
{
842
+
CheckDisposed();
843
+
844
+
if(path.IsNullOrWhiteSpace())
845
+
{
846
+
thrownewArgumentException("path");
847
+
}
848
+
849
+
if(_sftpSessionisnull)
850
+
{
851
+
thrownewSshConnectionException("Client not connected.");
0 commit comments