简体   繁体   English

使用来自 SSH2 的 SFTP 对象

[英]Using the SFTP object from SSH2

I'm using SSH2 to get and put files on a server via SFTP.我正在使用SSH2通过 SFTP 获取文件并将其放在服务器上。 I don't understand how to read or use this documentation though.我不明白如何阅读或使用这个文档。 I understand that there is an sftp object that is returned using the following method conn.sftp(function(err, sftp) . However, I'm not sure what this sftp actually is or how I can even see what methods it has. The documentation doesn't seem to offer anything for that.我知道有一个使用以下方法返回的sftp对象conn.sftp(function(err, sftp) 。但是,我不确定这个sftp实际上是什么,或者我如何才能看到它有哪些方法。文档似乎没有为此提供任何内容。

Looking through other places, I see that there is supposedly a fastPut method among other methods.查看其他地方,我发现在其他方法中应该有一个fastPut方法。

How can I see what methods is on this SFTP object if the documentation doesn't provide that?如果文档没有提供,我怎么能看到这个 SFTP 对象上有哪些方法? If the documentation does provide it, where would that be?如果文档确实提供了它,那会在哪里?

The Client.sftp method returns SFTPStream instance . Client.sftp方法返回SFTPStream实例

SFTPStream has fastPut method : SFTPStreamfastPut 方法

fastPut(< string >localPath, < string >remotePath[, < object >options], < function >callback) - (void) fastPut(<string>localPath,<string>remotePath[,<object>options],<function>callback) - (void)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM