I am using SharpSsh library to get file names from sftp server. Connection is OK but I get exception of type 'Tamir.SharpSsh.jsch.SftpException' in this code:

_sftp.GetFileList("/outgoing")

When I was testing my code on my local sftp server on Windows the result was file names array. But in production we use sftp server on Linux and now I get this exception. Can anybody tell me how to specify path argument in GetFileList for sftp server on Linux.

Thanks!

有帮助吗?

解决方案

I was able to make it work removing the initial slash:

_sftp.GetFileList("outgoing")

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top