Module fd

Source
Expand description

The main File type and its supporting utilities for working safely with file descriptors.

Modules§

fcntl
A safer abstraction for fcntl.
ioctl
A safer abstraction for ioctl.
sockopt
A safer abstraction for setsockopt and getsockopt.

Structs§

AllDirEntries
DirEntries
An iterator over directory entries in an already-populated getdents64 result buffer.
DirEntry
A single directory entry extracted from a buffer populated by getdents64.
File
An encapsulated Linux file descriptor.
OpenOptions
Encapsulates the various options for the open system call behind a builder API.

Enums§

DirEntryType
Directory entry type.
OpenWithMode
A marker type used with OpenOptions to represent situations where opening the file would require a mode argument.
OpenWithoutMode
A marker type used with OpenOptions to represent situations where opening the file would require a mode argument.

Constants§

OPEN_READ_ONLY
Use with File::open to open a file only for reading.
OPEN_READ_WRITE
Use with File::open to open a file for both reading and writing.
OPEN_WRITE_ONLY
Use with File::open to open a file only for writing.

Traits§

OpenMode
A marker trait used with OpenOptions to represent whether a particular set of options must be opened with an additional mode argument.