Skip to main content

Module files

Module files 

Source
Expand description

Shared safe file access: pinned no-follow opens and directory listings.

Structs§

EntryName
One path component, ready for openat.

Enums§

FileKind
The type of a directory entry, read without following it.

Constants§

ALIASED_NAMES
Whether a name can reach an entry spelled differently, as case-insensitive Windows and macOS volumes allow; path-returning interfaces then also check the exact spelling.

Functions§

canonicalize
The absolute path of an existing file with every link resolved.
case_sensitive
Preserve the existing case-sensitive logical namespace on other Unix systems.
current_directory
Read the process’s current directory and resolve its native filesystem aliases.
entry_kind
The type of one entry of a pinned directory, without following it.
exact_name
Other Unix platforms keep their existing case-sensitive open behavior.
is_absolute
The filesystem root of an absolute path (/, or a Windows volume or share) and the names below it, in order. None when a component is . or ... Whether a native path is absolute on this system.
is_link_refusal
Whether open_entry failed because the entry is a symlink: O_NOFOLLOW reports ELOOP on Linux and macOS, and EMLINK on FreeBSD and DragonFly.
link_target
The target a link names, read without following it: a symlink’s text, or on Windows a junction’s or symbolic link’s substitute name.
logical_below
The logical form of path below root: an absolute native path is taken relative to root (None outside it), a relative one is already logical.
logical_from_native
Convert a native relative path into logical components; roots, traversal and non-UTF-8 names are refused rather than guessing at the host’s separator or prefix rules.
open_directory
Open a directory by path, such as the root a scoped walk starts from.
open_entry
Open one entry of a pinned directory read-only, without following a symlink.
open_no_follow
Open without following a link in the last component or blocking on a FIFO.
open_nonblocking
Open for reading without blocking on a FIFO, so its type can be checked first.
path_text
Render a native path for people and JSON clients with portable / separators.
read_dir
The entries of a pinned directory, listed through its descriptor rather than a path that could have been replaced by a link.
scoped_relative
Parse the physical relative input form used by declared Artifact roots. Preserve its existing rejection of backslashes and traversal while keeping native root checks here.
split_root