Module file_util

Source

Structs§

BlockingAsyncReader
AsyncRead`` implementation backed by a Read. It is not actually async; the goal is simply to avoid reading the full contents from the Read` into memory.
PathError

Traits§

IoResultExt

Functions§

check_symlink_support
Symlinks are always available on UNIX
copy_async_to_sync
Reads from an async source and writes to a sync destination. Does not spawn a task, so writes will block.
create_or_reuse_dir
Creates a directory or does nothing if the directory already exists.
expand_home_path
Expands “~/” to “$HOME/”.
normalize_path
Consumes as much .. and . as possible without considering symlinks.
persist_content_addressed_temp_file
Like NamedTempFile::persist(), but doesn’t try to overwrite the existing target on Windows.
relative_path
Turns the given to path into relative path starting from the from path.
remove_dir_contents
Removes all files in the directory, but not the directory itself.
try_symlink