pub struct Ufs<R: Backend> { /* private fields */ }Expand description
Berkley Unix (Fast) Filesystem v2
Implementations§
Source§impl<R: Backend> Ufs<R>
impl<R: Backend> Ufs<R>
Sourcepub fn dir_lookup(&mut self, pinr: InodeNum, name: &OsStr) -> IoResult<InodeNum>
pub fn dir_lookup(&mut self, pinr: InodeNum, name: &OsStr) -> IoResult<InodeNum>
Find a file named name in the directory referenced by pinr.
Sourcepub fn dir_iter<T>(
&mut self,
inr: InodeNum,
f: impl FnMut(&OsStr, InodeNum, InodeType) -> Option<T>,
) -> IoResult<Option<T>>
pub fn dir_iter<T>( &mut self, inr: InodeNum, f: impl FnMut(&OsStr, InodeNum, InodeType) -> Option<T>, ) -> IoResult<Option<T>>
Iterate through a directory referenced by inr, and call f for each entry.
pub fn unlink(&mut self, dinr: InodeNum, name: &OsStr) -> IoResult<()>
pub fn rmdir(&mut self, dinr: InodeNum, name: &OsStr) -> IoResult<()>
pub fn mknod( &mut self, dinr: InodeNum, name: &OsStr, kind: InodeType, perm: u16, uid: u32, gid: u32, ) -> IoResult<InodeAttr>
pub fn mkdir( &mut self, dinr: InodeNum, name: &OsStr, perm: u16, uid: u32, gid: u32, ) -> IoResult<InodeAttr>
Source§impl<R: Backend> Ufs<R>
impl<R: Backend> Ufs<R>
Sourcepub fn inode_attr(&mut self, inr: InodeNum) -> IoResult<InodeAttr>
pub fn inode_attr(&mut self, inr: InodeNum) -> IoResult<InodeAttr>
Get metadata about an inode.
Sourcepub fn inode_read(
&mut self,
inr: InodeNum,
offset: u64,
buffer: &mut [u8],
) -> IoResult<usize>
pub fn inode_read( &mut self, inr: InodeNum, offset: u64, buffer: &mut [u8], ) -> IoResult<usize>
Read data from an inode.
pub fn inode_write( &mut self, inr: InodeNum, offset: u64, buffer: &[u8], ) -> IoResult<usize>
pub fn inode_modify( &mut self, inr: InodeNum, f: impl FnOnce(InodeAttr) -> InodeAttr, ) -> IoResult<InodeAttr>
Source§impl<R: Backend> Ufs<R>
impl<R: Backend> Ufs<R>
Sourcepub fn xattr_list_len(&mut self, inr: InodeNum) -> IoResult<u32>
pub fn xattr_list_len(&mut self, inr: InodeNum) -> IoResult<u32>
Get the size of the extended attribute area of inode inr.
Sourcepub fn xattr_list(&mut self, inr: InodeNum) -> IoResult<Vec<u8>>
pub fn xattr_list(&mut self, inr: InodeNum) -> IoResult<Vec<u8>>
Get the list of extended attribyte names.
Each entry follows the following format:
"namespace.name\0"
Auto Trait Implementations§
impl<R> Freeze for Ufs<R>where
R: Freeze,
impl<R> RefUnwindSafe for Ufs<R>where
R: RefUnwindSafe,
impl<R> Send for Ufs<R>where
R: Send,
impl<R> Sync for Ufs<R>where
R: Sync,
impl<R> Unpin for Ufs<R>where
R: Unpin,
impl<R> UnwindSafe for Ufs<R>where
R: UnwindSafe,
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