Loops through multiple files in a sequence, recursive, giving their names.
[Visual Basic]
Overloads Public Sub LoopFiles( _
ByVal RemotePath As String, _
ByVal MaxLevel As System.Int32 _
)
[C#]
public void LoopFiles(
string RemoteFile,
int MaxLevel
);
Parameters
RemotePath
Holds full path on the server from where to start enumerating files and folders.
MaxLevel
Specifies maximum number of subdirectory levels to copy. 0 for unlimited.
Remarks
This method will just loop through all folders and files on specified
RemotePath, and fire
LoopItem event for each file/folder it finds - allowing you to save it
(for example, in local collection) and then use later for various
file/folder operations. wodSFTP.NET will not do anything with those items by
itself! Since LoopItem will provide full paths to those files, it is easy to
use those paths later on with
GetFile, GetAttributes,
PutFile,
DeleteFile (etc.)
operations.
If you want to download all those files (and create appropriate directory
structure locally) you should use
GetFiles method instead.
Do not forget that RemotePath should always
specify full absolute path (i.e. /home/joe/something) instead of relative
path (i.e. joe/something).
See Also
SFTP Class | SFTP Members | WeOnlyDo.Client Namespace | SFTP.LoopFiles Overload List