[][src]Struct btfs::MemFilesystem

pub struct MemFilesystem { /* fields omitted */ }

Methods

impl MemFilesystem[src]

pub fn new() -> MemFilesystem[src]

pub fn getattr(&mut self, ino: u64) -> Result<&FileAttr, Error>[src]

pub fn setattr(
    &mut self,
    ino: u64,
    new_attrs: SetAttrRequest
) -> Result<&FileAttr, Error>
[src]

Updates the attributes on an inode with values in new_attrs.

pub fn readdir(
    &mut self,
    ino: InodeId,
    _fh: u64
) -> Result<Vec<(InodeId, FileType, String)>, Error>
[src]

pub fn lookup(&mut self, parent: u64, name: &OsStr) -> Result<&FileAttr, Error>[src]

pub fn rmdir(&mut self, parent: u64, name: &OsStr) -> Result<(), Error>[src]

pub fn mkdir(
    &mut self,
    parent: u64,
    name: &OsStr,
    _mode: u32
) -> Result<&FileAttr, Error>
[src]

pub fn create(
    &mut self,
    parent: u64,
    name: &OsStr,
    mode: u32,
    flags: u32
) -> Result<&FileAttr, Error>
[src]

pub fn write(
    &mut self,
    ino: u64,
    fh: u64,
    offset: i64,
    data: &[u8],
    _flags: u32
) -> Result<u64, Error>
[src]

pub fn read(
    &mut self,
    ino: u64,
    fh: u64,
    offset: i64,
    size: u32
) -> Result<&[u8], Error>
[src]

pub fn rename(
    &mut self,
    parent: u64,
    current_name: &OsStr,
    new_parent: u64,
    new_name: &OsStr
) -> Result<(), Error>
[src]

Rename a file.

Trait Implementations

impl Default for MemFilesystem[src]

impl Filesystem for MemFilesystem[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]