質問

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