Skip to main content

list_directory

Get the contents of a directory.

list_directory("path/to/your/directory");

Syntax

list_directory(path)

Returns

An array of objects declared as {path: "string", type: "string"}

  • where path refers to the full path name of the element.
  • where type refers to the element type (f for file and d for directory)

Notes

  • Expects a path to a DIRECTORY, not a file.