Trait FileSystem

Source
pub trait FileSystem:
    ValueToString
    + Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn read(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileContent>
       where Self: Sized;
    fn read_link(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<LinkContent>
       where Self: Sized;
    fn raw_read_dir(
        self: Vc<Self>,
        fs_path: Vc<FileSystemPath>,
    ) -> Vc<RawDirectoryContent>
       where Self: Sized;
    fn write(
        self: Vc<Self>,
        fs_path: Vc<FileSystemPath>,
        content: Vc<FileContent>,
    ) -> Vc<()>
       where Self: Sized;
    fn write_link(
        self: Vc<Self>,
        fs_path: Vc<FileSystemPath>,
        target: Vc<LinkContent>,
    ) -> Vc<()>
       where Self: Sized;
    fn metadata(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileMeta>
       where Self: Sized;

    // Provided method
    fn root(self: Vc<Self>) -> Vc<FileSystemPath>
       where Self: Sized { ... }
}

Required Methods§

Source

fn read(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileContent>
where Self: Sized,

Source

fn raw_read_dir( self: Vc<Self>, fs_path: Vc<FileSystemPath>, ) -> Vc<RawDirectoryContent>
where Self: Sized,

Source

fn write( self: Vc<Self>, fs_path: Vc<FileSystemPath>, content: Vc<FileContent>, ) -> Vc<()>
where Self: Sized,

Source

fn metadata(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileMeta>
where Self: Sized,

Provided Methods§

Source

fn root(self: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized,

Returns the path to the root of the file system.

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn FileSystem>

Source§

fn get_trait_type_id() -> TraitTypeId

Source§

impl Dynamic<Box<dyn FileSystem>> for Box<dyn FileSystem>

Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn FileSystem>

Source§

impl Dynamic<Box<dyn ValueToString>> for Box<dyn FileSystem>

Source§

impl Upcast<Box<dyn FileSystem>> for Box<dyn FileSystem>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn FileSystem>

Source§

impl Upcast<Box<dyn ValueToString>> for Box<dyn FileSystem>

Implementors§

Source§

impl FileSystem for AttachedFileSystem

Source§

impl FileSystem for EmbeddedFileSystem

Source§

impl FileSystem for DiskFileSystem

Source§

impl FileSystem for NullFileSystem

Source§

impl FileSystem for VirtualFileSystem

Source§

impl<T> FileSystem for T
where T: Dynamic<Box<dyn FileSystem>> + ValueToString + Send + Sync + NonLocalValue + ValueDebug,