Skip to main content

Module fs

Module fs 

Source

Functionsยง

count_files
Count files recursively in a directory.
deploy_symlinks
Deploy symlinks from src into dst recursively (creating directories as needed).
is_cross_device_error
Check if an I/O error is a cross-device link error (EXDEV on Unix, ERROR_NOT_SAME_DEVICE on Windows). Used to fall back from rename to copy+delete when source and destination are on different filesystems.
symlink
Create a symlink at link pointing to original, using the correct platform API. On Windows the call inspects original to decide between symlink_file and symlink_dir.
symlink_async
Create a symlink asynchronously, using the correct platform API. On Windows, inspects original to pick symlink_file vs symlink_dir.
walk_files
Recursively walk a directory, collecting all absolute file paths.
walk_files_relative
Recursively walk a directory, collecting (relative_path, absolute_path) pairs for all files.