pub struct FileStat(/* private fields */);Implementations§
Source§impl FileStat
impl FileStat
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/hellofs.rs (line 17)
16 fn metadata(&self, path: &Path) -> fuse_rs::Result<FileStat> {
17 let mut stat = FileStat::new();
18 match path.to_str().expect("path") {
19 "/" => {
20 stat.st_mode = SFlag::S_IFDIR.bits() | 0o755;
21 stat.st_nlink = 3;
22 }
23 "/hello.txt" => {
24 stat.st_mode = SFlag::S_IFREG.bits() | 0o644;
25 stat.st_nlink = 1;
26 stat.st_size = HELLO_WORLD.len() as _;
27 }
28 _ => return Err(Errno::ENOENT),
29 }
30 Ok(stat)
31 }Trait Implementations§
impl Eq for FileStat
impl StructuralPartialEq for FileStat
Auto Trait Implementations§
impl Freeze for FileStat
impl RefUnwindSafe for FileStat
impl Send for FileStat
impl Sync for FileStat
impl Unpin for FileStat
impl UnwindSafe for FileStat
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