Back to Aurora Vision Library Lite website

You are here: Start » System » File System » EnumerateObjects

EnumerateObjects


Header: STD.h
Namespace: avl

Enumerates the avdata files present in a disk directory and sorts them according to the specified order and loads an object from a file.

Syntax

bool avl::EnumerateObjects
(
	EnumerateFilesState& ioState,
	const atl::Directory& inDirectory,
	avl::FileSortingOrder::Type inSortingOrder,
	bool inRepeat,
	bool inProcessSubdirectories,
	bool inInvert,
	avl::StreamMode::Type inStreamMode,
	atl::File& outFilePath,
	atl::String& outFileName,
	Type& outObject,
	atl::Optional<bool> outIsFirst = atl::NIL,
	atl::Optional<bool> outIsLast = atl::NIL
)

Parameters

Name Type Default Description
Input will be modified ioState EnumerateFilesState& Object used to maintain state of the function.
Input value inDirectory const Directory& Input directory
Input value inSortingOrder FileSortingOrder::Type Sorting order
Input value inRepeat bool Determines whether to repeat reading directory after reading all files
Input value inProcessSubdirectories bool Flag indicating whether to enumerate files from the subdirectories or not
Input value inInvert bool Flag indicating whether to enumerate files backwards or not
Input value inStreamMode StreamMode::Type Binary or text format of the files.
Output value outFilePath File& Output file path
Output value outFileName String& Output file name
Output value outObject Type&
Output value outIsFirst Optional<bool> NIL Flag indicating the first iteration
Output value outIsLast Optional<bool> NIL Flag indicating the last iteration

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outIsFirst, outIsLast.

Read more about Optional Outputs.

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

List of possible exceptions:

Error type Description
DomainError Not supported stream mode in EnumerateObjects function.