Skip to main content

Module fs

Module fs 

Source
Expand description

Filesystem helpers that respect HostContext dry-run vs apply.

Functionsยง

chmod
Set Unix mode bits on path (chmod).
copy_dir_contents
Recursively copy contents of src into dest (like cp -a src/. dest/).
copy_file
Copy a single file from src to dest, creating the dest parent as needed.
ensure_dir
Ensure path exists as a directory (mkdir -p).
remove_path
Remove a file, symlink, or directory tree at path.
write_file
Write content to path, creating parent directories as needed.