pub trait FileSystem:
ValueToString
+ Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn read(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<FileContent>
where Self: Sized;
fn read_link(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<LinkContent>
where Self: Sized;
fn is_junction_point(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<bool>
where Self: Sized;
fn raw_read_dir(
self: Vc<Self>,
fs_path: FileSystemPath,
) -> Vc<RawDirectoryContent>
where Self: Sized;
fn write(
self: Vc<Self>,
fs_path: FileSystemPath,
content: Vc<FileContent>,
) -> Vc<()>
where Self: Sized;
fn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<WriteLinkContent>,
) -> Vc<()>
where Self: Sized;
fn metadata(self: Vc<Self>, fs_path: 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: FileSystemPath) -> Vc<FileContent>where
Self: Sized,
Sourcefn read_link(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<LinkContent>where
Self: Sized,
fn read_link(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<LinkContent>where
Self: Sized,
Reads the target of a symbolic link (or junction point on Windows). See LinkContent.
Sourcefn is_junction_point(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<bool>where
Self: Sized,
fn is_junction_point(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<bool>where
Self: Sized,
Returns whether a symbolic link is a junction point on Windows. Always false on all other
platforms.
fn raw_read_dir(
self: Vc<Self>,
fs_path: FileSystemPath,
) -> Vc<RawDirectoryContent>where
Self: Sized,
fn write(
self: Vc<Self>,
fs_path: FileSystemPath,
content: Vc<FileContent>,
) -> Vc<()>where
Self: Sized,
Sourcefn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<WriteLinkContent>,
) -> Vc<()>where
Self: Sized,
fn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<WriteLinkContent>,
) -> Vc<()>where
Self: Sized,
Creates a symbolic link. See WriteLinkContent and FileSystemPath::write_link.
fn metadata(self: Vc<Self>, fs_path: 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.
Trait Implementations§
impl Dynamic<Box<dyn FileSystem>> for Box<dyn FileSystem>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.
impl Dynamic<Box<dyn ValueToString>> for Box<dyn FileSystem>
Source§impl TraitVtablePrototype for Box<dyn FileSystem>
impl TraitVtablePrototype for Box<dyn FileSystem>
impl Upcast<Box<dyn FileSystem>> for DiskFileSystem
impl Upcast<Box<dyn FileSystem>> for EmbeddedFileSystem
impl Upcast<Box<dyn FileSystem>> for NullFileSystem
impl Upcast<Box<dyn FileSystem>> for VirtualFileSystem
impl Upcast<Box<dyn FileSystem>> for Box<dyn FileSystem>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn ValueToString>> for Box<dyn FileSystem>
impl UpcastStrict<Box<dyn FileSystem>> for DiskFileSystem
impl UpcastStrict<Box<dyn FileSystem>> for EmbeddedFileSystem
impl UpcastStrict<Box<dyn FileSystem>> for NullFileSystem
impl UpcastStrict<Box<dyn FileSystem>> for VirtualFileSystem
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.
impl UpcastStrict<Box<dyn ValueToString>> for Box<dyn FileSystem>
Source§impl VcValueTrait for Box<dyn FileSystem>
impl VcValueTrait for Box<dyn FileSystem>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
type ValueTrait = dyn FileSystem
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".