Struct FileSystem

Source
pub struct FileSystem { /* private fields */ }

Implementations§

Source§

impl FileSystem

Source

pub fn new(device: Device, cache_size: usize) -> Result<Self>

Source

pub fn format(device: Device, cache_size: usize) -> Result<()>

Source

pub fn is_file(file: LocalFileIdentifier) -> bool

Trait Implementations§

Source§

impl Drop for FileSystem

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl FileSystemTraits for FileSystem

Source§

fn open( &self, task: TaskIdentifier, path: &Path, flags: Flags, time: Time, user: UserIdentifier, group: GroupIdentifier, ) -> Result<LocalFileIdentifier>

Open a file for I/O operations. Read more
Source§

fn close(&self, file: LocalFileIdentifier) -> Result<()>

Close a file and release its resources. Read more
Source§

fn close_all(&self, task: TaskIdentifier) -> Result<()>

Close all files opened by a specific task. Read more
Source§

fn duplicate(&self, file: LocalFileIdentifier) -> Result<LocalFileIdentifier>

Create a duplicate file identifier for the same file. Read more
Source§

fn transfert( &self, new_task: TaskIdentifier, file_identifier: LocalFileIdentifier, new_file: Option<FileIdentifier>, ) -> Result<LocalFileIdentifier>

Transfer a file identifier from one task to another. Read more
Source§

fn remove(&self, path: &Path) -> Result<()>

Remove a file or directory from the file system. Read more
Source§

fn read( &self, file: LocalFileIdentifier, buffer: &mut [u8], _: Time, ) -> Result<Size>

Read data from an open file. Read more
Source§

fn write( &self, file: LocalFileIdentifier, buffer: &[u8], _: Time, ) -> Result<Size>

Write data to an open file. Read more
Source§

fn rename(&self, source: &Path, destination: &Path) -> Result<()>

Rename or move a file or directory. Read more
Source§

fn set_position( &self, file: LocalFileIdentifier, position: &Position, ) -> Result<Size>

Set the position of the file. Read more
Source§

fn flush(&self, file: LocalFileIdentifier) -> Result<()>

Source§

fn get_statistics(&self, file: LocalFileIdentifier) -> Result<Statistics_type>

Source§

fn get_mode(&self, file: LocalFileIdentifier) -> Result<Mode>

Source§

fn open_directory( &self, path: &Path, task: TaskIdentifier, ) -> Result<LocalFileIdentifier>

Source§

fn read_directory(&self, file: LocalFileIdentifier) -> Result<Option<Entry>>

Source§

fn set_position_directory( &self, file: LocalFileIdentifier, position: Size, ) -> Result<()>

Source§

fn rewind_directory(&self, file: LocalFileIdentifier) -> Result<()>

Source§

fn close_directory(&self, file: LocalFileIdentifier) -> Result<()>

Source§

fn create_directory( &self, path: &Path, time: Time, user: UserIdentifier, group: GroupIdentifier, ) -> Result<()>

Source§

fn get_position_directory(&self, file: LocalFileIdentifier) -> Result<Size>

Source§

fn set_metadata_from_path(&self, path: &Path, metadata: &Metadata) -> Result<()>

Source§

fn get_metadata_from_path(&self, path: &Path) -> Result<Metadata>

Source§

fn get_metadata(&self, file: LocalFileIdentifier) -> Result<Metadata>

Source§

impl Send for FileSystem

Source§

impl Sync for FileSystem

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.