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§
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 Methods§
Sourcefn root(self: Vc<Self>) -> Vc<FileSystemPath>where
Self: Sized,
fn root(self: Vc<Self>) -> Vc<FileSystemPath>where
Self: Sized,
Returns the path to the root of the file system.