From 6cb3cd9b5ebe34492d5d1877b8acc6b305a593d8 Mon Sep 17 00:00:00 2001
From: Chathulanka Gamage <61736812+cmgchess@users.noreply.github.com>
Date: Mon, 6 Jul 2026 22:16:12 +0530
Subject: [PATCH] docs: add missing SftpPathNotFoundException exception
documentation for ListDirectory, ListDirectoryAsync (#1810)
---
src/Renci.SshNet/ISftpClient.cs | 2 ++
src/Renci.SshNet/SftpClient.cs | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/Renci.SshNet/ISftpClient.cs b/src/Renci.SshNet/ISftpClient.cs
index 7b1237bc..8369266d 100644
--- a/src/Renci.SshNet/ISftpClient.cs
+++ b/src/Renci.SshNet/ISftpClient.cs
@@ -813,6 +813,7 @@ namespace Renci.SshNet
/// is .
/// Client is not connected.
/// Permission to list the contents of the directory was denied by the remote host. -or- A SSH command was denied by the server.
+ /// The specified path is invalid, or its directory 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.
IEnumerable ListDirectory(string path, Action? listCallback = null);
@@ -829,6 +830,7 @@ namespace Renci.SshNet
/// is .
/// Client is not connected.
/// Permission to list the contents of the directory was denied by the remote host. -or- A SSH command was denied by the server.
+ /// The specified path is invalid, or its directory 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.
IAsyncEnumerable ListDirectoryAsync(string path, CancellationToken cancellationToken);
diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs
index 4e554abb..947139f8 100644
--- a/src/Renci.SshNet/SftpClient.cs
+++ b/src/Renci.SshNet/SftpClient.cs
@@ -606,6 +606,7 @@ namespace Renci.SshNet
/// is .
/// Client is not connected.
/// Permission to list the contents of the directory was denied by the remote host. -or- A SSH command was denied by the server.
+ /// The specified path is invalid, or its directory 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.
public IEnumerable ListDirectory(string path, Action? listCallback = null)
@@ -627,6 +628,7 @@ namespace Renci.SshNet
/// is .
/// Client is not connected.
/// Permission to list the contents of the directory was denied by the remote host. -or- A SSH command was denied by the server.
+ /// The specified path is invalid, or its directory 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.
public async IAsyncEnumerable ListDirectoryAsync(string path, [EnumeratorCancellation] CancellationToken cancellationToken)