pub struct Directory { /* private fields */ }
Available on
Linux
only.Expand description
An open directory that is guaranteed to exist for the lifetime of the Directory
. Can also be
used to obtain an iterator over each contained DirEntry
.
Implementations§
Source§impl Directory
impl Directory
pub fn open<P: AsRef<Path<Abs>>>(dir_path: P) -> Result<Directory, RawOsError>
pub fn read_entries<'a>(&'a self) -> DirEntries<'a> ⓘ
pub fn metadata(&self) -> Result<Metadata, MetadataError>
pub fn close(self) -> Result<(), CloseError>
pub fn try_clone(&self) -> Result<Directory, CloneError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnwindSafe for Directory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more