struct NullFs;
Trait Implementations§
source§impl FileSystem for NullFs
impl FileSystem for NullFs
§type Inode = u64
type Inode = u64
Represents a location in the filesystem tree and can be used to perform operations that act
on the metadata of a file/directory (e.g.,
getattr
and setattr
). Can also be used as the
starting point for looking up paths in the filesystem tree. An Inode
may support operating
directly on the content of the path that to which it points. FileSystem
implementations
that support this should set the FsOptions::ZERO_MESSAGE_OPEN
option in the return value
of the init
function. On linux based systems, an Inode
is equivalent to opening a file
or directory with the libc::O_PATH
flag. Read more§type DirIter = NullIter
type DirIter = NullIter
An iterator over the entries of a directory. See the documentation for
readdir
for more
details.source§fn max_buffer_size(&self) -> u32
fn max_buffer_size(&self) -> u32
Maximum size of the buffer that the filesystem can generate data to, including the header.
This corresponds to max_write in the initialization.
source§fn lookup(
&self,
ctx: Context,
parent: Self::Inode,
name: &CStr
) -> Result<Entry>
fn lookup( &self, ctx: Context, parent: Self::Inode, name: &CStr ) -> Result<Entry>
Look up a directory entry by name and get its attributes. Read more
source§fn forget(&self, ctx: Context, inode: Self::Inode, count: u64)
fn forget(&self, ctx: Context, inode: Self::Inode, count: u64)
Forget about an inode. Read more
source§fn batch_forget(&self, ctx: Context, requests: Vec<(Self::Inode, u64)>)
fn batch_forget(&self, ctx: Context, requests: Vec<(Self::Inode, u64)>)
Forget about multiple inodes. Read more
source§fn getattr(
&self,
ctx: Context,
inode: Self::Inode,
handle: Option<Self::Handle>
) -> Result<(stat64, Duration)>
fn getattr( &self, ctx: Context, inode: Self::Inode, handle: Option<Self::Handle> ) -> Result<(stat64, Duration)>
Get attributes for a file / directory. Read more
source§fn setattr(
&self,
ctx: Context,
inode: Self::Inode,
attr: stat64,
handle: Option<Self::Handle>,
valid: SetattrValid
) -> Result<(stat64, Duration)>
fn setattr( &self, ctx: Context, inode: Self::Inode, attr: stat64, handle: Option<Self::Handle>, valid: SetattrValid ) -> Result<(stat64, Duration)>
Set attributes for a file / directory. Read more
source§fn symlink(
&self,
ctx: Context,
linkname: &CStr,
parent: Self::Inode,
name: &CStr,
security_ctx: Option<&CStr>
) -> Result<Entry>
fn symlink( &self, ctx: Context, linkname: &CStr, parent: Self::Inode, name: &CStr, security_ctx: Option<&CStr> ) -> Result<Entry>
Create a symbolic link. Read more
source§fn mknod(
&self,
ctx: Context,
inode: Self::Inode,
name: &CStr,
mode: u32,
rdev: u32,
umask: u32,
security_ctx: Option<&CStr>
) -> Result<Entry>
fn mknod( &self, ctx: Context, inode: Self::Inode, name: &CStr, mode: u32, rdev: u32, umask: u32, security_ctx: Option<&CStr> ) -> Result<Entry>
Create a file node. Read more
source§fn mkdir(
&self,
ctx: Context,
parent: Self::Inode,
name: &CStr,
mode: u32,
umask: u32,
security_ctx: Option<&CStr>
) -> Result<Entry>
fn mkdir( &self, ctx: Context, parent: Self::Inode, name: &CStr, mode: u32, umask: u32, security_ctx: Option<&CStr> ) -> Result<Entry>
Create a directory. Read more
source§fn chromeos_tmpfile(
&self,
ctx: Context,
parent: Self::Inode,
mode: u32,
umask: u32,
security_ctx: Option<&CStr>
) -> Result<Entry>
fn chromeos_tmpfile( &self, ctx: Context, parent: Self::Inode, mode: u32, umask: u32, security_ctx: Option<&CStr> ) -> Result<Entry>
Create an unnamed temporary file.
source§fn unlink(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> Result<()>
fn unlink(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> Result<()>
Remove a file. Read more
source§fn rmdir(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> Result<()>
fn rmdir(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> Result<()>
Remove a directory. Read more
source§fn rename(
&self,
ctx: Context,
olddir: Self::Inode,
oldname: &CStr,
newdir: Self::Inode,
newname: &CStr,
flags: u32
) -> Result<()>
fn rename( &self, ctx: Context, olddir: Self::Inode, oldname: &CStr, newdir: Self::Inode, newname: &CStr, flags: u32 ) -> Result<()>
Rename a file / directory. Read more
source§fn link(
&self,
ctx: Context,
inode: Self::Inode,
newparent: Self::Inode,
newname: &CStr
) -> Result<Entry>
fn link( &self, ctx: Context, inode: Self::Inode, newparent: Self::Inode, newname: &CStr ) -> Result<Entry>
Create a hard link. Read more
source§fn open(
&self,
ctx: Context,
inode: Self::Inode,
flags: u32
) -> Result<(Option<Self::Handle>, OpenOptions)>
fn open( &self, ctx: Context, inode: Self::Inode, flags: u32 ) -> Result<(Option<Self::Handle>, OpenOptions)>
Open a file. Read more
source§fn create(
&self,
ctx: Context,
parent: Self::Inode,
name: &CStr,
mode: u32,
flags: u32,
umask: u32,
security_ctx: Option<&CStr>
) -> Result<(Entry, Option<Self::Handle>, OpenOptions)>
fn create( &self, ctx: Context, parent: Self::Inode, name: &CStr, mode: u32, flags: u32, umask: u32, security_ctx: Option<&CStr> ) -> Result<(Entry, Option<Self::Handle>, OpenOptions)>
Create and open a file. Read more
source§fn read<W: Write + ZeroCopyWriter>(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
w: W,
size: u32,
offset: u64,
lock_owner: Option<u64>,
flags: u32
) -> Result<usize>
fn read<W: Write + ZeroCopyWriter>( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, w: W, size: u32, offset: u64, lock_owner: Option<u64>, flags: u32 ) -> Result<usize>
Read data from a file. Read more
source§fn write<R: Read + ZeroCopyReader>(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
r: R,
size: u32,
offset: u64,
lock_owner: Option<u64>,
delayed_write: bool,
flags: u32
) -> Result<usize>
fn write<R: Read + ZeroCopyReader>( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, r: R, size: u32, offset: u64, lock_owner: Option<u64>, delayed_write: bool, flags: u32 ) -> Result<usize>
Write data to a file. Read more
source§fn flush(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
lock_owner: u64
) -> Result<()>
fn flush( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, lock_owner: u64 ) -> Result<()>
Flush the contents of a file. Read more
source§fn fsync(
&self,
ctx: Context,
inode: Self::Inode,
datasync: bool,
handle: Self::Handle
) -> Result<()>
fn fsync( &self, ctx: Context, inode: Self::Inode, datasync: bool, handle: Self::Handle ) -> Result<()>
Synchronize file contents. Read more
source§fn fallocate(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
mode: u32,
offset: u64,
length: u64
) -> Result<()>
fn fallocate( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, mode: u32, offset: u64, length: u64 ) -> Result<()>
Allocate requested space for file data. Read more
source§fn release(
&self,
ctx: Context,
inode: Self::Inode,
flags: u32,
handle: Self::Handle,
flush: bool,
flock_release: bool,
lock_owner: Option<u64>
) -> Result<()>
fn release( &self, ctx: Context, inode: Self::Inode, flags: u32, handle: Self::Handle, flush: bool, flock_release: bool, lock_owner: Option<u64> ) -> Result<()>
Release an open file. Read more
source§fn statfs(&self, ctx: Context, inode: Self::Inode) -> Result<statvfs64>
fn statfs(&self, ctx: Context, inode: Self::Inode) -> Result<statvfs64>
Get information about the file system.
source§fn setxattr(
&self,
ctx: Context,
inode: Self::Inode,
name: &CStr,
value: &[u8],
flags: u32
) -> Result<()>
fn setxattr( &self, ctx: Context, inode: Self::Inode, name: &CStr, value: &[u8], flags: u32 ) -> Result<()>
Set an extended attribute. Read more
source§fn getxattr(
&self,
ctx: Context,
inode: Self::Inode,
name: &CStr,
size: u32
) -> Result<GetxattrReply>
fn getxattr( &self, ctx: Context, inode: Self::Inode, name: &CStr, size: u32 ) -> Result<GetxattrReply>
Get an extended attribute. Read more
source§fn listxattr(
&self,
ctx: Context,
inode: Self::Inode,
size: u32
) -> Result<ListxattrReply>
fn listxattr( &self, ctx: Context, inode: Self::Inode, size: u32 ) -> Result<ListxattrReply>
List extended attribute names. Read more
source§fn removexattr(
&self,
ctx: Context,
inode: Self::Inode,
name: &CStr
) -> Result<()>
fn removexattr( &self, ctx: Context, inode: Self::Inode, name: &CStr ) -> Result<()>
Remove an extended attribute. Read more
source§fn opendir(
&self,
ctx: Context,
inode: Self::Inode,
flags: u32
) -> Result<(Option<Self::Handle>, OpenOptions)>
fn opendir( &self, ctx: Context, inode: Self::Inode, flags: u32 ) -> Result<(Option<Self::Handle>, OpenOptions)>
Open a directory for reading. Read more
source§fn readdir(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
size: u32,
offset: u64
) -> Result<Self::DirIter>
fn readdir( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, size: u32, offset: u64 ) -> Result<Self::DirIter>
Read a directory. Read more
source§fn fsyncdir(
&self,
ctx: Context,
inode: Self::Inode,
datasync: bool,
handle: Self::Handle
) -> Result<()>
fn fsyncdir( &self, ctx: Context, inode: Self::Inode, datasync: bool, handle: Self::Handle ) -> Result<()>
Synchronize the contents of a directory. Read more
source§fn releasedir(
&self,
ctx: Context,
inode: Self::Inode,
flags: u32,
handle: Self::Handle
) -> Result<()>
fn releasedir( &self, ctx: Context, inode: Self::Inode, flags: u32, handle: Self::Handle ) -> Result<()>
Release an open directory. Read more
source§fn access(&self, ctx: Context, inode: Self::Inode, mask: u32) -> Result<()>
fn access(&self, ctx: Context, inode: Self::Inode, mask: u32) -> Result<()>
Check file access permissions. Read more
source§fn ioctl<R: Read>(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
flags: IoctlFlags,
cmd: u32,
arg: u64,
in_size: u32,
out_size: u32,
reader: R
) -> Result<IoctlReply>
fn ioctl<R: Read>( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, flags: IoctlFlags, cmd: u32, arg: u64, in_size: u32, out_size: u32, reader: R ) -> Result<IoctlReply>
Perform an ioctl on a file or directory. Read more
source§fn notify_reply(&self) -> Result<()>
fn notify_reply(&self) -> Result<()>
TODO: support this
source§fn copy_file_range(
&self,
ctx: Context,
inode_src: Self::Inode,
handle_src: Self::Handle,
offset_src: u64,
inode_dst: Self::Inode,
handle_dst: Self::Handle,
offset_dst: u64,
length: u64,
flags: u64
) -> Result<usize>
fn copy_file_range( &self, ctx: Context, inode_src: Self::Inode, handle_src: Self::Handle, offset_src: u64, inode_dst: Self::Inode, handle_dst: Self::Handle, offset_dst: u64, length: u64, flags: u64 ) -> Result<usize>
Copy a range of data from one file to another Read more
source§fn set_up_mapping<M: Mapper>(
&self,
ctx: Context,
inode: Self::Inode,
handle: Self::Handle,
file_offset: u64,
mem_offset: u64,
size: usize,
flags: u32,
mapper: M
) -> Result<()>
fn set_up_mapping<M: Mapper>( &self, ctx: Context, inode: Self::Inode, handle: Self::Handle, file_offset: u64, mem_offset: u64, size: usize, flags: u32, mapper: M ) -> Result<()>
Set up memory mappings. Read more
source§fn remove_mapping<M: Mapper>(
&self,
msgs: &[RemoveMappingOne],
mapper: M
) -> Result<()>
fn remove_mapping<M: Mapper>( &self, msgs: &[RemoveMappingOne], mapper: M ) -> Result<()>
Remove memory mappings. Read more
Auto Trait Implementations§
impl RefUnwindSafe for NullFs
impl Send for NullFs
impl Sync for NullFs
impl Unpin for NullFs
impl UnwindSafe for NullFs
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