[][src]Trait libfuse::Operations

pub trait Operations {
    fn init(&mut self, conn: &mut ConnectionInfo) { ... }
fn lookup(&mut self, parent: NodeId, name: &CStr) -> OperationResult<Entry> { ... }
fn forget(&mut self, id: NodeId, nlookup: u64) { ... }
fn readlink(&mut self, id: NodeId) -> OperationResult<CString> { ... }
fn mknod(
        &mut self,
        parent: NodeId,
        name: &CStr,
        mode: mode_t,
        rdev: dev_t
    ) -> OperationResult<Entry> { ... }
fn mkdir(
        &mut self,
        parent: NodeId,
        name: &CStr,
        mode: mode_t
    ) -> OperationResult<Entry> { ... }
fn unlink(&mut self, parent: NodeId, name: &CStr) -> OperationResult<()> { ... }
fn rmdir(&mut self, parent: NodeId, name: &CStr) -> OperationResult<()> { ... }
fn symlink(
        &mut self,
        link: &CStr,
        parent: NodeId,
        name: &CStr
    ) -> OperationResult<Entry> { ... }
fn rename(
        &mut self,
        oldparent: NodeId,
        oldname: &CStr,
        newparent: NodeId,
        newname: &CStr,
        flags: RenameFlags
    ) -> OperationResult<()> { ... }
fn link(
        &mut self,
        id: NodeId,
        newparent: NodeId,
        newname: &CStr
    ) -> OperationResult<Entry> { ... }
fn statfs(&mut self, id: NodeId) -> OperationResult<statvfs> { ... }
fn setxattr(
        &mut self,
        id: NodeId,
        name: &CStr,
        value: &[u8],
        flags: XAttrFlags
    ) -> OperationResult<()> { ... }
fn getxattr(
        &mut self,
        id: NodeId,
        name: &CStr,
        size: usize
    ) -> OperationResult<XAttrReply> { ... }
fn listxattr(
        &mut self,
        id: NodeId,
        size: usize
    ) -> OperationResult<XAttrReply> { ... }
fn removexattr(&mut self, id: NodeId, name: &CStr) -> OperationResult<()> { ... }
fn access(&mut self, id: NodeId, mask: c_int) -> OperationResult<()> { ... }
fn open(
        &mut self,
        id: NodeId,
        options: &mut OpenOptions
    ) -> OperationResult<u64> { ... }
fn create(
        &mut self,
        parent: NodeId,
        name: &CStr,
        mode: mode_t,
        options: &mut OpenOptions
    ) -> OperationResult<(Entry, u64)> { ... }
fn read(
        &mut self,
        id: NodeId,
        off: off_t,
        bufsize: usize,
        opts: &mut ReadOptions,
        fh: u64
    ) -> OperationResult<Cow<[u8]>> { ... }
fn write(
        &mut self,
        id: NodeId,
        buf: &[u8],
        off: off_t,
        opts: &mut WriteOptions,
        fh: u64
    ) -> OperationResult<usize> { ... }
fn flush(
        &mut self,
        id: NodeId,
        opts: &mut FlushOptions,
        fh: u64
    ) -> OperationResult<()> { ... }
fn getattr(
        &mut self,
        id: NodeId,
        fh: Option<u64>
    ) -> OperationResult<(stat, f64)> { ... }
fn setattr(
        &mut self,
        id: NodeId,
        attrs: &SetAttrs,
        fh: Option<u64>
    ) -> OperationResult<(stat, f64)> { ... }
fn fsync(
        &mut self,
        id: NodeId,
        datasync: c_int,
        fh: u64
    ) -> OperationResult<()> { ... }
fn release(
        &mut self,
        id: NodeId,
        options: &mut ReleaseOptions,
        fh: u64
    ) -> OperationResult<()> { ... }
fn opendir(
        &mut self,
        id: NodeId,
        options: &mut OpenDirOptions
    ) -> OperationResult<u64> { ... }
fn readdir(
        &mut self,
        id: NodeId,
        offset: off_t,
        buf: &mut DirBuf,
        fh: u64
    ) -> OperationResult<()> { ... }
fn fsyncdir(
        &mut self,
        id: NodeId,
        datasync: c_int,
        fh: u64
    ) -> OperationResult<()> { ... }
fn releasedir(&mut self, id: NodeId, fh: u64) -> OperationResult<()> { ... } }

Provided methods

fn init(&mut self, conn: &mut ConnectionInfo)

Initialize the filesystem.

fn lookup(&mut self, parent: NodeId, name: &CStr) -> OperationResult<Entry>

Look up a directory entry by name and get its attributes.

fn forget(&mut self, id: NodeId, nlookup: u64)

Forget about an inode.

Read a symbolic link.

fn mknod(
    &mut self,
    parent: NodeId,
    name: &CStr,
    mode: mode_t,
    rdev: dev_t
) -> OperationResult<Entry>

Create a file node.

fn mkdir(
    &mut self,
    parent: NodeId,
    name: &CStr,
    mode: mode_t
) -> OperationResult<Entry>

Create a directory.

Remove a file.

fn rmdir(&mut self, parent: NodeId, name: &CStr) -> OperationResult<()>

Remove a directory.

Create a symbolic link.

fn rename(
    &mut self,
    oldparent: NodeId,
    oldname: &CStr,
    newparent: NodeId,
    newname: &CStr,
    flags: RenameFlags
) -> OperationResult<()>

Rename a file.

Create a hard link.

fn statfs(&mut self, id: NodeId) -> OperationResult<statvfs>

Get file system statistics.

fn setxattr(
    &mut self,
    id: NodeId,
    name: &CStr,
    value: &[u8],
    flags: XAttrFlags
) -> OperationResult<()>

Set an extended attribute.

fn getxattr(
    &mut self,
    id: NodeId,
    name: &CStr,
    size: usize
) -> OperationResult<XAttrReply>

Get an extended attribute.

fn listxattr(&mut self, id: NodeId, size: usize) -> OperationResult<XAttrReply>

List extended attribute names.

fn removexattr(&mut self, id: NodeId, name: &CStr) -> OperationResult<()>

Remove an extended attribute.

fn access(&mut self, id: NodeId, mask: c_int) -> OperationResult<()>

fn open(
    &mut self,
    id: NodeId,
    options: &mut OpenOptions
) -> OperationResult<u64>

Open a file.

fn create(
    &mut self,
    parent: NodeId,
    name: &CStr,
    mode: mode_t,
    options: &mut OpenOptions
) -> OperationResult<(Entry, u64)>

Create and open a file.

fn read(
    &mut self,
    id: NodeId,
    off: off_t,
    bufsize: usize,
    opts: &mut ReadOptions,
    fh: u64
) -> OperationResult<Cow<[u8]>>

Read data from an opened file.

If the size of returned data is larger than bufsize, the remaining part is ignored and the method must be read again them at the next call.

fn write(
    &mut self,
    id: NodeId,
    buf: &[u8],
    off: off_t,
    opts: &mut WriteOptions,
    fh: u64
) -> OperationResult<usize>

Write data to a file.

fn flush(
    &mut self,
    id: NodeId,
    opts: &mut FlushOptions,
    fh: u64
) -> OperationResult<()>

Flush an opened file.

fn getattr(
    &mut self,
    id: NodeId,
    fh: Option<u64>
) -> OperationResult<(stat, f64)>

Get file attributes.

fn setattr(
    &mut self,
    id: NodeId,
    attrs: &SetAttrs,
    fh: Option<u64>
) -> OperationResult<(stat, f64)>

Set file attributes.

fn fsync(&mut self, id: NodeId, datasync: c_int, fh: u64) -> OperationResult<()>

Synchronisze the file contents.

fn release(
    &mut self,
    id: NodeId,
    options: &mut ReleaseOptions,
    fh: u64
) -> OperationResult<()>

Release an opened file.

fn opendir(
    &mut self,
    id: NodeId,
    options: &mut OpenDirOptions
) -> OperationResult<u64>

Open a directory.

fn readdir(
    &mut self,
    id: NodeId,
    offset: off_t,
    buf: &mut DirBuf,
    fh: u64
) -> OperationResult<()>

Read a directory.

fn fsyncdir(
    &mut self,
    id: NodeId,
    datasync: c_int,
    fh: u64
) -> OperationResult<()>

Synchronisze the file contents.

fn releasedir(&mut self, id: NodeId, fh: u64) -> OperationResult<()>

Release an opened directory.

Loading content...

Implementors

Loading content...