Back to Adaptive Vision Library website

You are here: Start » Function Reference » File System » FindFiles


Returns files of the input directory.


void avl::FindFiles
	const atl::Directory& inStartDirectory,
	const atl::String& inMask,
	bool inSubdirs,
	avl::FileSortingOrder::Type inSortingOrder,
	atl::Array<atl::File>& outFilePaths,
	atl::Array<atl::String>& outFileNames,
	bool& outFound = atl::Dummy&lt;bool&gt;()


Name Type Default Description
inStartDirectory const Directory& \".\" Input directory
inMask const String& \"*\" Wildcard pattern
inSubdirs bool Read subdirectories
inSortingOrder FileSortingOrder::Type Sorting order
outFilePaths Array<File>& File paths
outFileNames Array<String>& File names
outFound bool& Dummy()


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
You can use any expression like examples below:
  • * - all files,
  • *.jpg - files only with extension .jpg,
  • Filename.* - files with name "Filename" and any extension, including no extension ie. "Filename."
  • Filename.?? - files with name "Filename" and two letter extension,


Error type Description
DomainError Given start directory is invalid in FindFiles.
IoError Error opening start directory in FindFiles.

See Also