Module cap_primitives::fs[][src]

Filesystem utilities.

Structs

DirBuilder

A builder used to create directories in various manners.

DirEntry

Entries returned by the ReadDir iterator.

DirOptions

Options and flags which can be used to configure how a directory is created.

FileType

A structure representing a type of file with accessors for each file type.

Metadata

Metadata information about a file.

OpenOptions

Options and flags which can be used to configure how a file is opened.

Permissions

Representation of the various permissions on a file.

ReadDir

Iterator over the entries in a directory.

Enums

FollowSymlinks

Should symlinks be followed in the last component of a path?

SystemTimeSpec

A value for specifying a time.

Functions

canonicalize

Canonicalize the given path, ensuring that the resolution of the path never escapes the directory tree rooted at start.

copy

Copies the contents of one file to another.

create_dir

Perform a mkdirat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

hard_link

Perform a linkat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

is_file_read_write

Return a pair of booleans indicating whether the given file is opened for reading and writing, respectively.

open

Perform an openat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

open_ambient_dir

Open a directory named by a bare path, using the host process' ambient authority.

open_dir

Open a directory by performing an openat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

open_dir_for_reading

Like open_dir, but additionally request the ability to read the directory entries.

open_dir_nofollow

Similar to open_dir, but fails if the path names a symlink.

read_base_dir

Like read_dir but operates on the base directory itself, rather than on a path based on it.

read_dir

Construct a ReadDir to iterate over the contents of a directory, ensuring that the resolution of the path never escapes the directory tree rooted at start.

read_link

Perform a readlinkat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

remove_dir

Perform a rmdirat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

remove_dir_all

Removes a directory and all of its contents.

remove_file

Perform a remove_fileat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

remove_open_dir

Given an open directory handle, delete the directory.

remove_open_dir_all

Given an open directory handle, recursively delete the contents of the directory plus the directory itself.

rename

Perform a renameat-like operation, ensuring that the resolution of both the old and new paths never escape the directory tree rooted at their respective starts.

reopen

Re-open an fs::File to produce an independent handle.

set_permissions

Perform a chmodat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

set_times

Perform a utimensat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start. This function follows symlinks.

set_times_nofollow

Like set_times, but never follows symlinks.

stat

Perform an fstatat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.

symlink

Perform a symlinkat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start.