[][src]Struct gvfs::vfs::PhysicalFS

pub struct PhysicalFS { /* fields omitted */ }

A VFS that points to a directory and uses it as the root of its file hierarchy.

It IS allowed to have symlinks in it! They're surprisingly difficult to get rid of.

Methods

impl PhysicalFS[src]

pub fn new(root: &Path, readonly: bool) -> Self[src]

Create new PhysicalFS

Trait Implementations

impl VFS for PhysicalFS[src]

fn open_options(
    &self,
    path: &Path,
    open_options: OpenOptions
) -> Result<Box<dyn VFile>>
[src]

Open the file at this path with the given options

fn mkdir(&self, path: &Path) -> Result[src]

Create a directory at the location by this path

fn rm(&self, path: &Path) -> Result[src]

Remove a file

fn rmrf(&self, path: &Path) -> Result[src]

Remove a file or directory and all its contents

fn exists(&self, path: &Path) -> bool[src]

Check if the file exists

fn metadata(&self, path: &Path) -> Result<Box<dyn VMetadata>>[src]

Get the file's metadata

fn read_dir(
    &self,
    path: &Path
) -> Result<Box<dyn Iterator<Item = Result<PathBuf>>>>
[src]

Retrieve the path entries in this path

fn to_path_buf(&self) -> Option<PathBuf>[src]

Retrieve the actual location of the VFS root, if available.

fn open(&self, path: &Path) -> Result<Box<dyn VFile>>[src]

Open the file at this path for reading

fn create(&self, path: &Path) -> Result<Box<dyn VFile>>[src]

Open the file at this path for writing, truncating it if it exists already

fn append(&self, path: &Path) -> Result<Box<dyn VFile>>[src]

Open the file at this path for appending, creating it if necessary

impl Clone for PhysicalFS[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PhysicalFS[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]