Available on
Linux
only.Expand description
Types for interacting with the directories of a file system. Simpler than the file module, this
one is primarily focussed on the Directory
and DirEntry
types.
This module provides the Directory
type and associated types, including errors and
iterators.
§Opening
With less options relevant while opening Directory
s, this module current does not provide a
builder like file’s OpenOptions
. This may change in the
future, if more relevant options are found.
§Access Mode
Unlike File
s, Directory
s are currently not associated with an access mode
to restrict operations at compile time. This may be changed in the future however, if it helps
to better represent the underlying entity and its functionality.
Structs§
- DirEntries
- An iterator over a
Directory
’s contained entries. Obtainable viaDirectory::read_entries
, this buffered iterator producesDirEntry
s for the referenced directory. - DirEntry
- An entry in a
Directory
’s records, taking the form of a reference to the parentDirectory
and the relative path to this entry, along with a few other pieces of information. - Directory
- An open directory that is guaranteed to exist for the lifetime of the
Directory
. Can also be used to obtain an iterator over each containedDirEntry
.