Filesystem
Private
Description
Work with files and directories.
Capabilities
-
read_fileReads and returns the contents of the given filename.
-
write_fileWrites provided content to the specified file path.
-
copy_file_or_directoryCopies the contents in source to destination recursively, maintaining the source directory structure and mode, and overwriting existing files - working just like the Unix 'cp -Rf' command. Returns a list of all copied files and directories.
-
delete_file_or_directoryRemoves files and directories recursively at the given path - working just like the Unix 'rm -rf' command. Symlinks are not followed but simply removed, non-existing files are simply ignored (i.e. doesn't make this function fail). Returns a list of all deleted files and directories.
-
lookup_files_and_directoriesTraverses paths according to the given glob expression and returns a list of existing matches together with basic stat information (type, size and mtime). May be used to list a single directory (with glob like "*" or "./my_dir/*"), traverse it recursively (with glob like "**/*" or "/tmp/**/*") or check for specific path's existence & information (with glob like "path/to/file.txt"). Relative paths are resolved in "/home". Matching is case-sensitive and it does include dotfiles.
-
make_directoryCreates the directory path, including missing parent directories - working just like the Unix 'mkdir -p' command.
-
rename_file_or_directoryRenames the source file or directory to specified destination path. It can be used to move files (and directories) between directories.