List files in directory
Returns a list of files and directories in the specified path. Supports an optional regex pattern for filtering. Returns a FileError value when the directory cannot be read.
path (String): [Optional] The
directory to list. Defaults to “.”.
pattern (String): [Optional] Regex
pattern to filter results.
List of filenames.
list_files(".", pattern = "\\.t$")