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: Into<OwnedPath<Abs>>>( dir_path: P, ) -> Result<Directory, OpenError>
pub fn open_rel<P: Into<OwnedPath<Rel>>>( &self, relative_to: &Directory, dir_path: P, ) -> Result<Directory, OpenError>
pub fn open_dir_entry( &self, dir_ent: &DirEntry<'_>, ) -> Result<Directory, OpenError>
pub fn create<P: AsRef<Path<Abs>>>( dir_path: P, file_mode: u16, ) -> 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