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
ValidatedReader
A reader that validates its contents while reading.

Enums§

LockedFileError
LockedFileMode
Whether to acquire a shared (read) lock or exclusive (write) lock.
PhysicalSpaceError
An error encountered while measuring a file’s physical storage.

Statics§

CWD
The current working directory.

Traits§

PythonExt
Simplified

Functions§

clear_virtualenv
Prepare an empty virtual environment directory, resolving links when possible.
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.
created_time
Return a path’s creation time, including on Linux targets where std::fs::Metadata::created does not expose the filesystem birth time.
directories
Iterate over the subdirectories of a directory.
entries
Iterate over the entries in a directory.
files
Iterate over the files in a directory.
files_with_one_hardlink
Collect regular files whose only hardlink is their entry in this directory.
find_git_repository_root
Find the root of the nearest Git repository containing path.
hardlink_count
Return the number of hardlinks to a file.
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 Cow path, removing ., .., repeated separators (//), and trailing slashes.
normalize_path_under
Normalize path, returning it when it remains strictly under a non-empty root.
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.
physical_space
Return the physical file data that would be reclaimed by deleting path.
relative_to
Compute a path describing path relative to base.
remove_symlink
Remove a symbolic link at path without following its target.
remove_virtualenv
Perform a safe removal of a virtual environment.
replace_symlink
Create a symlink at dst pointing to src, replacing any existing symlink if necessary.
supports_fine_grained_accounting
Return whether the current platform supports fine-grained space accounting.
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.