我需要通过使用VB的SFTP获取所有文件名的列表。我试图把它放在一个ArrayList,但不确定的命令使用..从远程目录获取文件名列表FTP SSH
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
请让我知道如果你需要别的东西。谢谢!