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.

The output property Results returns a combined string containing all found files - one file per line. This property can be used for manual iteration. See Text Splitter Node. If no files have been found, a null string is returned.

See also: