Dart.Ftp Namespace > Ftp Class > Get Method : Get(List<ListEntry>,String,String,Synchronize) Method |
Public Overloads Function Get( _ ByVal remoteFiles As List(Of ListEntry), _ ByVal remoteRoot As String, _ ByVal localRoot As String, _ ByVal sync As Synchronize _ ) As List(Of CopyResult)
Dim instance As Ftp Dim remoteFiles As List(Of ListEntry) Dim remoteRoot As String Dim localRoot As String Dim sync As Synchronize Dim value As List(Of CopyResult) value = instance.Get(remoteFiles, remoteRoot, localRoot, sync)
public List<CopyResult> Get( List<ListEntry> remoteFiles, string remoteRoot, string localRoot, Synchronize sync )
public: List<CopyResult^>^ Get( List<ListEntry^>^ remoteFiles, String^ remoteRoot, String^ localRoot, Synchronize sync )
If the file or directory paths relative to remoteRoot contain characters that are invalid for the local filesystem, those characters will be replaced with an underscore when constructing the local path.
DataIsBusy returns true while this method executes.
public void getMultipleFiles() { //Retrieve a list of txt files to transfer. List<ListEntry> filesToGet = ftp1.ListDirectoryTree("MyTextFiles", "*.txt", true); //Tailor the list to not include a specific file. foreach (ListEntry entry in filesToGet) { if (entry.Name == "not_me.txt") { filesToGet.Remove(entry); break; } } //Retrieve the files. string workingDirectory = ftp1.GetDirectory(); ftp1.Get(filesToGet, workingDirectory + "/MyTextFiles", myLocalDirectory, Synchronize.Off); }
Public Sub getMultipleFiles() 'Retrieve a list of txt files to transfer. Dim filesToGet As List(Of ListEntry) = ftp1.ListDirectoryTree("MyTextFiles", "*.txt", True) 'Tailor the list to not include a specific file. For Each entry As ListEntry In filesToGet If entry.Name = "not_me.txt" Then filesToGet.Remove(entry) Exit For End If Next entry 'Retrieve the files. Dim workingDirectory As String = ftp1.GetDirectory() ftp1.Get(filesToGet, workingDirectory & "/MyTextFiles", myLocalDirectory, Synchronize.Off) End Sub