Skip to main content

Module fs

Module fs 

Source
Expand description

File system utilities.

Functionsยง

copy_dir_all
Recursively copy a directory tree from src to dst.
ensure_dir
Ensure path and all its parents exist (like mkdir -p).
find_files
Recursively find all files under dir with the given extension (without the leading dot).
is_dir
Return true if path exists and is a directory.
is_file
Return true if path exists and is a regular file.
read_bytes
Read raw bytes from a file.
read_to_string
Read a file to a String.
write_atomic
Write contents to path atomically via a temporary sibling file.