Back to Adaptive Vision Library website

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

EnumerateFiles


Enumerates the files present in a disk directory.

Syntax

bool avl::EnumerateFiles
(
	EnumerateFilesState& ioState,
	const atl::Directory& inDirectory,
	const atl::String& inExtensions,
	avl::FileSortingOrder::Type inSortingOrder,
	bool inRepeat,
	bool inProcessSubdirectories,
	bool inInvert,
	atl::File& outFilePath,
	atl::String& outFileName
)

Parameters

Name Type Default Description
ioState EnumerateFilesState& Object used to maintain state of the function.
inDirectory const Directory& Input directory
inExtensions const String& Allowed extensions separated by semicolon
inSortingOrder FileSortingOrder::Type Sorting order
inRepeat bool Determines whether to repeat reading directory after reading all files
inProcessSubdirectories bool Flag indicating whether to enumerate files from the subdirectories or not
inInvert bool Flag indicating whether to enumerate files backwards or not
outFilePath File& Output file path
outFileName String& Output file name

Remarks

Linux

Sorting output by file creation date when running AVL on Linux is not possible due to file system restrictions. When requested to do so EnumerateFiles will throw an exception.

Errors

Error type Description
DomainError Empty string is not a valid directory path.
DomainError Directory doesn't exist: Directory path
DomainError Cannot sort by file creation date on Linux.