Skip to main content

RealFs

Struct RealFs 

Source
pub struct RealFs;
Expand description

Production filesystem implementation — delegates to std::fs.

Implementations§

Source§

impl RealFs

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for RealFs

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl VortexFs for RealFs

Source§

fn read_file(&self, path: &str) -> VortexFsResult<Vec<u8>>

Read the entire contents of a file.
Source§

fn write_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>

Write data to a file (creates or overwrites).
Source§

fn append_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>

Append data to a file (creates if not exists).
Source§

fn remove_file(&mut self, path: &str) -> VortexFsResult<()>

Remove a file.
Source§

fn rename(&mut self, from: &str, to: &str) -> VortexFsResult<()>

Rename a file or directory.
Source§

fn create_dir_all(&mut self, path: &str) -> VortexFsResult<()>

Create a directory (and all parent directories).
Source§

fn remove_dir(&mut self, path: &str) -> VortexFsResult<()>

Remove an empty directory.
Source§

fn read_dir(&self, path: &str) -> VortexFsResult<Vec<String>>

List the entries in a directory.
Source§

fn metadata(&self, path: &str) -> VortexFsResult<FileMetadata>

Get metadata about a file or directory.
Source§

fn exists(&self, path: &str) -> bool

Check if a path exists.
Source§

fn fsync(&mut self, path: &str) -> VortexFsResult<()>

Flush / fsync a file (no-op for in-memory, real sync for production).

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.