Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveRemote ¶
删除指定远程路径的文件。
入参:
- sshCli: SSH 客户端。
- path: 文件远程路径。
- useSCP: 是否使用 SCP 进行传输,否则使用 SFTP。
出参:
- 错误。
func WriteRemote ¶
将数据写入指定远程路径的文件。 如果目录不存在,将会递归创建目录。 如果文件不存在,将会创建该文件;如果文件已存在,将会覆盖原有内容。
入参:
- sshCli: SSH 客户端。
- path: 文件远程路径。
- data: 文件数据字节数组。
- useSCP: 是否使用 SCP 进行传输,否则使用 SFTP。
出参:
- 错误。
func WriteRemoteString ¶
与 WriteRemote 类似,但写入的是字符串内容。
入参:
- sshCli: SSH 客户端。
- path: 文件远程路径。
- data: 文件数据字节数组。
- useSCP: 是否使用 SCP 进行传输,否则使用 SFTP。
出参:
- 错误。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.