我需要使用 VB 通过 SFTP 获取所有文件名的列表。我正在尝试将它放在 ArrayList 中,但不确定要使用的命令..
Public Shared Function Retrieve_Directory_list(ByVal strHost As String, _
ByVal strUsername As String, _
ByVal strPassword As String, _
ByVal strFtpFilePath As String, _
ByVal strlocalFilePath As String) As ArrayList)
Dim sshCp As SshTransferProtocolBase
Dim res As New ArrayList()
sshCp = New Sftp(strHost, strUsername, strPassword)
sshCp.Connect()
'res = sshCp.???
sshCp.Close()
Return res
End Function
如果你还需要什么,请告诉我。谢谢!