[−][src]Struct redoxfs::FileSystem
A file system
Fields
disk: D
block: u64
header: (u64, Header)
Methods
impl<D: Disk> FileSystem<D>
[src]
pub fn open(disk: D) -> Result<Self>
[src]
Open a file system on a disk
pub fn create(disk: D, ctime: u64, ctime_nsec: u32) -> Result<Self>
[src]
Create a file system on a disk
pub fn create_reserved(
disk: D,
reserved: &[u8],
ctime: u64,
ctime_nsec: u32
) -> Result<Self>
[src]
disk: D,
reserved: &[u8],
ctime: u64,
ctime_nsec: u32
) -> Result<Self>
Create a file system on a disk, with reserved data at the beginning Reserved data will be zero padded up to the nearest block We need to pass ctime and ctime_nsec in order to initialize the unix timestamps
pub fn read_at(&mut self, block: u64, buffer: &mut [u8]) -> Result<usize>
[src]
Read at a certain spot in the disk, returning data into buffer
pub fn write_at(&mut self, block: u64, buffer: &[u8]) -> Result<usize>
[src]
pub fn allocate(&mut self, length: u64) -> Result<u64>
[src]
pub fn deallocate(&mut self, block: u64, length: u64) -> Result<()>
[src]
pub fn node(&mut self, block: u64) -> Result<(u64, Node)>
[src]
pub fn ex_node(&mut self, block: u64) -> Result<(u64, ExNode)>
[src]
pub fn child_nodes(
&mut self,
children: &mut Vec<(u64, Node)>,
parent_block: u64
) -> Result<()>
[src]
&mut self,
children: &mut Vec<(u64, Node)>,
parent_block: u64
) -> Result<()>
pub fn find_node(
&mut self,
name: &str,
parent_block: u64
) -> Result<(u64, Node)>
[src]
&mut self,
name: &str,
parent_block: u64
) -> Result<(u64, Node)>
pub fn insert_blocks(
&mut self,
block: u64,
length: u64,
parent_block: u64
) -> Result<()>
[src]
&mut self,
block: u64,
length: u64,
parent_block: u64
) -> Result<()>
pub fn create_node(
&mut self,
mode: u16,
name: &str,
parent_block: u64,
ctime: u64,
ctime_nsec: u32
) -> Result<(u64, Node)>
[src]
&mut self,
mode: u16,
name: &str,
parent_block: u64,
ctime: u64,
ctime_nsec: u32
) -> Result<(u64, Node)>
pub fn remove_blocks(
&mut self,
block: u64,
length: u64,
parent_block: u64
) -> Result<()>
[src]
&mut self,
block: u64,
length: u64,
parent_block: u64
) -> Result<()>
pub fn remove_node(
&mut self,
mode: u16,
name: &str,
parent_block: u64
) -> Result<()>
[src]
&mut self,
mode: u16,
name: &str,
parent_block: u64
) -> Result<()>
pub fn node_set_len(&mut self, block: u64, length: u64) -> Result<()>
[src]
pub fn read_node(
&mut self,
block: u64,
offset: u64,
buf: &mut [u8]
) -> Result<usize>
[src]
&mut self,
block: u64,
offset: u64,
buf: &mut [u8]
) -> Result<usize>
pub fn write_node(
&mut self,
block: u64,
offset: u64,
buf: &[u8],
mtime: u64,
mtime_nsec: u32
) -> Result<usize>
[src]
&mut self,
block: u64,
offset: u64,
buf: &[u8],
mtime: u64,
mtime_nsec: u32
) -> Result<usize>
pub fn node_len(&mut self, block: u64) -> Result<u64>
[src]
Auto Trait Implementations
impl<D> Send for FileSystem<D> where
D: Send,
D: Send,
impl<D> Sync for FileSystem<D> where
D: Sync,
D: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,