Differences

This shows you the differences between the selected revisions of the page.

library_session_enumerateremotefiles 2016-12-05 library_session_enumerateremotefiles 2023-03-20 (current)
Line 4: Line 4:
===== Syntax ===== ===== Syntax =====
<code csharp *> <code csharp *>
-public IEnumerable<RemoteFileInfo> EnumerateRemoteFiles(string path, string mask, EnumerationOptions options)+public IEnumerable<RemoteFileInfo> EnumerateRemoteFiles( 
 +····string path, 
 + ···string mask, 
 + ···EnumerationOptions options 
 +)
</code> </code>
<code vbnet *> <code vbnet *>
-Public Function EnumerateFiles(ByVal path As String, ByVal mask As String, ByVal options As EnumerationOptions) As IEnumerable(Of RemoteFileInfo)+Public Function EnumerateRemoteFiles( 
 + ····path As String, 
 + ····mask As String, 
 + ····options As EnumerationOptions 
 +) As IEnumerable(Of RemoteFileInfo)
</code> </code>
-==== Parameters ====+==== [[parameters]] Parameters ====
^ Name ^ Description ^ ^ Name ^ Description ^
-| string path | Full path to root remote directory to start enumeration in.  | +| string ==path== | Full path to root remote directory to start enumeration in.  | 
-| string mask | Windows wildcard to filter files.((The Windows wildcard supports ''*'' and ''?'' only.)) To select all files, use ''null''. | +| string ==mask== | Windows wildcard to filter files.((The Windows wildcard supports ''*'' and ''?'' only.)) To select all files, use ''null''. | 
-| EnumerationOptions options | Enumeration options set. \\ Possible values are: \\ ''EnumerationOptions.None'' - Enumerate matching files only. Do not recurse. \\ ''EnumerationOptions.AllDirectories'' - Recurse into subdirectories. \\ ''EnumerationOptions.MatchDirectories'' - Enumerate also matching directories. Cannot be combined with ''EnumerationOptions.EnumerateDirectories''. \\ ''EnumerationOptions.EnumerateDirectories'' - Enumerate also all directories. Must be used with ''EnumerationOptions.AllDirectories''. Cannot be combined with ''EnumerationOptions.MatchDirectories''.  |+| EnumerationOptions ==options== | Enumeration options set. \\ Possible values are: \\  • ''EnumerationOptions.None'' -- Enumerate matching files only. Do not recurse. \\  • ''EnumerationOptions.AllDirectories'' -- Recurse into subdirectories. \\  • ''EnumerationOptions.MatchDirectories'' -- Enumerate also matching directories. Cannot be combined with ''EnumerationOptions.EnumerateDirectories''. \\ •  ''EnumerationOptions.EnumerateDirectories'' -- Enumerate also all directories. Must be used with ''EnumerationOptions.AllDirectories''. Cannot be combined with ''EnumerationOptions.MatchDirectories''.  |
==== Return Value ==== ==== Return Value ====
Line 28: Line 36:
| TimeoutException | Timeout waiting for ''winscp.com'' to respond. | | TimeoutException | Timeout waiting for ''winscp.com'' to respond. |
-===== Remarks =====+===== [[remarks]] Remarks =====
References to this directory (''.'') and parent directory (''..'') are never enumerated. References to this directory (''.'') and parent directory (''..'') are never enumerated.
Line 35: Line 43:
Errors, when listing subfolders, are silently ignored. You can use the ''[[library_session_failed|Session.Failed]]'' event to capture these errors. Errors, when listing subfolders, are silently ignored. You can use the ''[[library_session_failed|Session.Failed]]'' event to capture these errors.
-The method cannot be used via COM interface (i.e. from [[library_com_wsh|VBScript, JScript]] or [[library_vb|VBA]].+The method cannot be used via COM interface (i.e. from [[library_com_wsh|VBScript, JScript]] or [[library_vb|VBA]]).
===== [[example]] Examples ===== ===== [[example]] Examples =====
-==== Real-Life Examples ==== 
-··* [[library_example_recursive_search_text|Search recursively for text in remote directory / Grep files over SFTP/FTP protocol]]; +==== Real-Life Examples ====
-  * [[library_example_recursive_download_custom_error_handling|Recursively download directory tree with custom error handling]]; +
-  * [[library_example_watch_for_changes|Watching for changes in SFTP/FTP server]].+
 +  * [[library_example_recursive_search_text|*]];
 +  * [[library_example_recursive_download_custom_error_handling|*]];
 +  * [[library_example_watch_for_changes|*]];
 +  * [[library_example_parallel_transfers|*]];
 +  * [[script_downloading_when_done_file_exists|*]];
 +  * [[script_download_files_to_same_folder|*]];
 +  * [[library_example_remember_downloaded_files|*]].

Last modified: by martin