Directory

Directory Searches a specified directory and provides files, matching a specific search-pattern.

The Directory Node is used to iterate over files contained in the specified directory (Path). The URI output property returns the URI to a file in the directory that matches the SearchPattern which can be changed to the next file via the Next method.

If the AutoUpdate property is activated, a separate thread will be started in the background to check the directory every 100ms for any changes. As an alternative, the Update method can be triggered to check for changes manually.

The SearchPattern is directly based to the .NET framework and therefore follows the syntax described in MSDN: Directory.GetFiles Method. Two wildcard characters are supported, ? to match exactly zero or one character and * to match zero or more characters. The SearchPattern cannot contain two periods followed by a directory separator (i.e. ..\).

Examples:

*.txt
data/image*.jpg

The properties SortMode and SortBy allows sorting of the results by name, size and date of the found file items.

The output property ResultArray returns a string array containing all found file URLs. This property can be used for manual iteration (see Array Indexer Node). If no matching files have been found, the array will be empty.

See also: