Module fs

Source

Functions§

copy
A wrapper around std::fs::copy which includes the file path in the panic message.
copy_dir_all
Copy a directory into another. This will not traverse symlinks; instead, it will create new symlinks pointing at target paths that symlinks in the original directory points to.
copy_symlink
Given a symlink at src, read its target, then create a new symlink at dst also pointing to target.
copy_symlink_raw 🔒
create_dir
A wrapper around std::fs::create_dir which includes the file path in the panic message.
create_dir_all
A wrapper around std::fs::create_dir_all which includes the file path in the panic message.
create_file
A wrapper around std::fs::File::create which includes the file path in the panic message.
metadata
A wrapper around std::fs::metadata which includes the file path in the panic message. Note that this will traverse symlinks and will return metadata about the target file. Use symlink_metadata if you don’t want to traverse symlinks.
read
A wrapper around std::fs::read which includes the file path in the panic message.
read_dir
A wrapper around std::fs::read_dir which includes the file path in the panic message.
read_dir_entries
Helper for reading entries in a given directory.
read_to_string
A wrapper around std::fs::read_to_string which includes the file path in the panic message.
recursive_remove
A wrapper around [build_helper::fs::recursive_remove] which includes the file path in the panic message.
remove_dir
A wrapper around std::fs::remove_dir which includes the directory path in the panic message.
remove_dir_all
A wrapper around std::fs::remove_dir_all which includes the file path in the panic message.
remove_file
A wrapper around std::fs::remove_file which includes the file path in the panic message.
rename
A wrapper around std::fs::rename which includes the file path in the panic message.
set_permissions
A wrapper around std::fs::set_permissions which includes the file path in the panic message.
shallow_find_dir_entries
List directory entries immediately under the given dir.
symlink_dir
Create a new symbolic link to a directory.
symlink_file
Create a new symbolic link to a file.
symlink_metadata
A wrapper around std::fs::symlink_metadata which includes the file path in the panic message. Note that this will not traverse symlinks and will return metadata about the filesystem entity itself. Use metadata if you want to traverse symlinks.
write
A wrapper around std::fs::write which includes the file path in the panic message.