Skip to main content

Crate uv_fs

Crate uv_fs 

Source

Modules§

cachedir
Vendored from cachedir 0.3.1 to replace std::fs with fs_err.
link
Utilities for linking a file or directory with various options and automated fallback (e.g., to copying) when link methods are unsupported.
which

Structs§

PortablePath
A path that can be serialized and deserialized in a portable way by converting Windows-style backslashes to forward slashes, and using a . for an empty path.
PortablePathBuf

Enums§

LockedFileError
LockedFileMode
Whether to acquire a shared (read) lock or exclusive (write) lock.

Statics§

CWD
The current working directory.

Traits§

PythonExt
Simplified

Functions§

copy_atomic_sync
Copy from to to atomically using a temporary file and atomic rename.
copy_dir_all
Recursively copy a directory and its contents.
create_symlink
Create a symlink at dst pointing to src.
directories
Iterate over the subdirectories of a directory.
entries
Iterate over the entries in a directory.
files
Iterate over the files in a directory.
is_same_file_allow_missing
Attempt to check if the two paths refer to the same file.
is_temporary
Returns true if a path is a temporary file or directory.
is_virtualenv_base
Returns true if a path is the base path of a virtual environment, indicated by the presence of a pyvenv.cfg file.
is_virtualenv_executable
Checks if the grandparent directory of the given executable is the base of a virtual environment.
normalize_absolute_path
Normalize a path, removing things like . and ...
normalize_path
Normalize a Path, removing ., .., and trailing slashes.
normalize_path_buf
Normalize a PathBuf, removing things like . and ...
normalize_url_path
Normalize the path component of a URL for use as a file path.
persist_with_retry_sync
Persist a NamedTempFile, retrying (on Windows) if it fails due to transient operating system errors.
relative_to
Compute a path describing path relative to base.
remove_symlink
replace_symlink
Create a symlink at dst pointing to src, replacing any existing symlink if necessary.
symlink_or_copy_file
Create a symlink at dst pointing to src on Unix or copy src to dst on Windows
tempfile_in
Return a NamedTempFile in the specified directory.
try_relative_to_if
Try to compute a path relative to base if should_relativize is true, otherwise return the absolute path. Falls back to absolute if relativization fails.
verbatim_path
Convert a Path to a Windows verbatim path (prefixed with \\?\) when possible to bypass Win32 path normalization such as MAX_PATH and removed trailing characters (dot, space). Other characters as defined by Path.GetInvalidFileNameChars are still prohibited. This function will attempt to perform path normalization similar to Win32 default normalization without triggering the existing Win32 limitations.
with_retry_sync
Wrap an arbitrary operation on two files, e.g., copying, with retries on transient operating system errors.
write_atomic_sync
Write data to path atomically using a temporary file and atomic rename.