Skip to main content
Lists the files and directories in the specified path.

Required Parameters

  • path: The fully qualified path whose directories and files will be listed (for example, /tmp/mydirectory).

Optional Parameters

  • mask: The pattern to use for filtering the result entries. The default is *. For example, a mask of *.json matches all files with a .json extension.
  • recurse: Whether to list entries recursively. The allowed values are false and true. The default is false.
  • fileordir: Whether to list only files or directories. The allowed values are all, files, and dirs. The default is all.

Output Attributes

  • file:fullname: The full path of the file or directory in the current entry.
  • file:name: The name of the file or directory in the current entry.
  • file:mtime: The time at which the file or directory in the current entry was written to.
  • file:ctime: The time at which the file or directory in the current entry was created.
  • file:atime: The time at which the file or directory in the current entry was last read from or written to.
  • file:attributes: A list of attributes of the file or directory in the current entry.
  • file:extension: The extension of the file in the current entry.
  • file:size: The size of the file in bytes.
  • file:isdir: Whether the entry is a file or directory.

Example