$io.list2

Returns the list of all files and subdirectories from the specified directory as an array.
Syntax
    $io.list2{directory}[{recurse}]?
DocumentationThis function is equivalent to $io.list. It just returns an array instead of a newline separated list. Returns an array of all files and subdirectories of the specified directory. If the second parameter is true (1) the list is enhanced by the function recursing itself over all found subdirectories.

    Parameters:
      1 - directory in SITEFORUM protocol notation 2 - recurse; boolean, optional, defaults to false
    Returns:
      Array of files.
    Throws:
      IOException
Examples
$io.list2{public://}
GroupSpecial
Minimum required transaction-mode:READ=IO
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters1
Maximum parameters 2