string GetDirectoryList(string rootdir, bool listDirectories, string extensionFilter, int sortFlags)

Gets a list of files and directories at a specified location. Sort flags are a bitmask of the following:

0 - Undefined
1 - Alphabetical
2 - DirectoriesFirst
4 - AlphanumericSort (requires 1 to be set)

Security

Trust Level Required: Full Trust

Parameters

Name Description
rootdir The location to search for files and sub-directories.
listDirectories True to include directories in the list, false to include files only.
extensionFilter A comma-separated list of extensions to filter by (bmp, txt, zip).
sortFlags A bitmask of sort flags (see above).

Return

A JSON string where Bool indicates if the function succeeded and Str is a list of FileInfo objects or an error message on failure.