VirtualFileSystem

Struct VirtualFileSystem 

Source
pub struct VirtualFileSystem { /* private fields */ }
Expand description

The virtual file system.

It is a singleton.

Implementations§

Source§

impl VirtualFileSystem

Source

pub fn new( _: &'static Manager, _: &'static Manager, _: &'static Manager<'_>, root_file_system: impl FileSystemOperations + 'static, ) -> Self

Source

pub async fn uninitialize(&self)

Source

pub async fn mount_file_system( &'static self, file_system: impl FileSystemOperations + 'static, path: impl AsRef<Path>, task: TaskIdentifier, ) -> Result<()>

Mount a file system at a given mount point.

Source

pub async fn unmount(&self, path: impl AsRef<Path>, force: bool) -> Result<()>

Source

pub async fn unmount_all(&self) -> Result<()>

Source

pub async fn open_directory( &self, task: TaskIdentifier, path: &impl AsRef<Path>, ) -> Result<Directory>

Source

pub async fn open( &self, path: &impl AsRef<Path>, flags: Flags, task: TaskIdentifier, ) -> Result<File>

Source

pub async fn mount_static( &self, task: TaskIdentifier, path: impl AsRef<Path>, item: ItemStatic, ) -> Result<()>

Source

pub async fn mount_block_device( &self, task: TaskIdentifier, path: impl AsRef<Path>, device: impl BlockDevice + 'static, ) -> Result<()>

Source

pub async fn mount_character_device( &self, task: TaskIdentifier, path: impl AsRef<Path>, device: impl CharacterDevice + 'static, ) -> Result<()>

Source

pub async fn create_named_pipe( &self, path: &impl AsRef<Path>, size: usize, task: TaskIdentifier, ) -> Result<()>

Source

pub async fn create_unnamed_pipe( &self, size: usize, status: StateFlags, ) -> Result<(File, File)>

Source

pub async fn remove( &self, task: TaskIdentifier, path: impl AsRef<Path>, ) -> Result<()>

Source

pub async fn create_directory( &self, task: TaskIdentifier, path: &impl AsRef<Path>, ) -> Result<()>

Source

pub async fn rename( &self, old_path: &impl AsRef<Path>, new_path: &impl AsRef<Path>, ) -> Result<()>

Source

pub async fn get_statistics( &self, path: &impl AsRef<Path>, ) -> Result<Statistics>

Source

pub async fn close( &self, item: &ItemStatic, context: &mut Context, ) -> Result<()>

Source

pub async fn set_ownership( &self, task: TaskIdentifier, path: impl AsRef<Path>, user: Option<UserIdentifier>, group: Option<GroupIdentifier>, ) -> Result<()>

Source

pub async fn set_permissions( &self, task: TaskIdentifier, path: impl AsRef<Path>, permissions: Permissions, ) -> Result<()>

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.