pub struct Directory { /* private fields */ }
Expand description
An opened directory object, with open permissions and a cursor for
read_dir
.
Implementations§
source§impl Directory
impl Directory
sourcepub fn open_dir(path: &str, opts: &OpenOptions) -> AxResult<Self>
pub fn open_dir(path: &str, opts: &OpenOptions) -> AxResult<Self>
Opens a directory at the path relative to the current directory.
Returns a Directory
object.
sourcepub fn open_dir_at(&self, path: &str, opts: &OpenOptions) -> AxResult<Self>
pub fn open_dir_at(&self, path: &str, opts: &OpenOptions) -> AxResult<Self>
Opens a directory at the path relative to this directory. Returns a
Directory
object.
sourcepub fn open_file_at(&self, path: &str, opts: &OpenOptions) -> AxResult<File>
pub fn open_file_at(&self, path: &str, opts: &OpenOptions) -> AxResult<File>
Opens a file at the path relative to this directory. Returns a File
object.
sourcepub fn create_file(&self, path: &str) -> AxResult<VfsNodeRef>
pub fn create_file(&self, path: &str) -> AxResult<VfsNodeRef>
Creates an empty file at the path relative to this directory.
sourcepub fn create_dir(&self, path: &str) -> AxResult
pub fn create_dir(&self, path: &str) -> AxResult
Creates an empty directory at the path relative to this directory.
sourcepub fn remove_file(&self, path: &str) -> AxResult
pub fn remove_file(&self, path: &str) -> AxResult
Removes a file at the path relative to this directory.
sourcepub fn remove_dir(&self, path: &str) -> AxResult
pub fn remove_dir(&self, path: &str) -> AxResult
Removes a directory at the path relative to this directory.
Trait Implementations§
Auto Trait Implementations§
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