Start » Filter Reference » System » File System » FindFiles
Module: | FoundationLite |
---|
Returns files of the input directory.
Name | Type | Description | |
---|---|---|---|
inStartDirectory | Directory | Input directory | |
inMask | String | Wildcard pattern | |
inSubdirs | Bool | Read subdirectories | |
inSortingOrder | FileSortingOrder* | Sorting order | |
outFilePaths | FileArray | File paths | |
outFileNames | StringArray | File names | |
outFound | Bool |
Examples
Description of usage of this filter can be found in examples and tutorial: Plate Measurement (Advanced).
Remarks
Working with Find Files
Start with defining a directory path in inStartDirectory port to choose where you want to look for files. To search files in subdirectories set inSubdirs to 'true'.inMask pattern string
Port inMask specifies wildcard pattern that selects files this filter will operate on. Supported wildcards:- * - any string of characters, including no characters
- ? - exactly one character
Examples:
- * - all files,
- *.jpg - files only with extension .jpg,
- Filename.* - files with name "Filename" and any extension, including no extension e.g. "Filename."
- Filename.?? - files with name "Filename" and two letter extension,
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Given start directory is invalid in FindFiles. |
IoError | Error opening start directory in FindFiles. |
Complexity Level
This filter is available on Advanced Complexity Level.
See Also
- EnumerateFiles – Enumerates the files present in a disk directory.
- TestFileExists – Checks if a given file is present.