pub enum FileOperation {
Read {
max_bytes: usize,
},
Write(Vec<u8>),
Entries {
max_entries: usize,
max_name_bytes: usize,
},
Exists,
Mkdir {
recursive: bool,
},
Unlink,
Rmdir,
Stat {
link: bool,
},
Rename {
to: String,
},
Readlink,
}Expand description
Filesystem operations provided by a host.
Variants§
Read
Read a regular file, refusing larger files before allocating them.
Write(Vec<u8>)
Replace a regular file’s contents.
Entries
List entries, stopping before either bound is exceeded.
Fields
Exists
Test existence.
Mkdir
Create a directory.
Unlink
Remove a file.
Rmdir
Remove an empty directory.
Stat
Read metadata, optionally for a link itself.
Rename
Move to another normalized relative path.
Readlink
Read a link’s target.
Auto Trait Implementations§
impl Forget for FileOperation
impl Freeze for FileOperation
impl Move for FileOperation
impl RefUnwindSafe for FileOperation
impl Send for FileOperation
impl Sync for FileOperation
impl Unpin for FileOperation
impl UnsafeUnpin for FileOperation
impl UnwindSafe for FileOperation
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