pub struct DiskFileSystem { /* private fields */ }
Implementations§
Source§impl DiskFileSystem
impl DiskFileSystem
pub fn name(&self) -> &RcStr
pub fn root(&self) -> &RcStr
pub fn invalidate(&self)
pub fn invalidate_with_reason<R: InvalidationReason + Clone>( &self, reason: impl Fn(String) -> R + Sync, )
pub async fn start_watching( &self, poll_interval: Option<Duration>, ) -> Result<()>
pub async fn start_watching_with_invalidation_reason( &self, poll_interval: Option<Duration>, ) -> Result<()>
pub fn stop_watching(&self)
pub async fn to_sys_path(&self, fs_path: Vc<FileSystemPath>) -> Result<PathBuf>
Source§impl DiskFileSystem
impl DiskFileSystem
Sourcepub fn new(name: RcStr, root: RcStr, ignored_subpaths: Vec<RcStr>) -> Vc<Self>
pub fn new(name: RcStr, root: RcStr, ignored_subpaths: Vec<RcStr>) -> Vc<Self>
Create a new instance of DiskFileSystem
.
§Arguments
name
- Name of the filesystem.root
- Path to the given filesystem’s root. Should be canonicalized.ignored_subpaths
- A list of subpaths that should not trigger invalidation. This should be a full path, since it is possible that root & project dir is different and requires to ignore specific subpaths from each.
Trait Implementations§
Source§impl Debug for DiskFileSystem
impl Debug for DiskFileSystem
Source§impl<'de> Deserialize<'de> for DiskFileSystem
impl<'de> Deserialize<'de> for DiskFileSystem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FileSystem for DiskFileSystem
impl FileSystem for DiskFileSystem
fn read(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileContent>
fn raw_read_dir( self: Vc<Self>, fs_path: Vc<FileSystemPath>, ) -> Vc<RawDirectoryContent>
fn read_link(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<LinkContent>
fn write( self: Vc<Self>, fs_path: Vc<FileSystemPath>, content: Vc<FileContent>, ) -> Vc<()>
fn write_link( self: Vc<Self>, fs_path: Vc<FileSystemPath>, target: Vc<LinkContent>, ) -> Vc<()>
fn metadata(self: Vc<Self>, fs_path: Vc<FileSystemPath>) -> Vc<FileMeta>
Source§fn 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.
Source§impl Serialize for DiskFileSystem
impl Serialize for DiskFileSystem
Source§impl ShrinkToFit for DiskFileSystem
impl ShrinkToFit for DiskFileSystem
fn shrink_to_fit(&mut self)
Source§impl TraceRawVcs for DiskFileSystem
impl TraceRawVcs for DiskFileSystem
fn trace_raw_vcs(&self, __context__: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
Source§impl ValueDebug for DiskFileSystem
impl ValueDebug for DiskFileSystem
Source§impl ValueDebugFormat for DiskFileSystem
impl ValueDebugFormat for DiskFileSystem
fn value_debug_format<'a>(&'a self, depth: usize) -> ValueDebugFormatString<'a>
Source§impl VcValueType for DiskFileSystem
impl VcValueType for DiskFileSystem
Source§type Read = VcDefaultRead<DiskFileSystem>
type Read = VcDefaultRead<DiskFileSystem>
How to read the value.
Source§type CellMode = VcCellNewMode<DiskFileSystem>
type CellMode = VcCellNewMode<DiskFileSystem>
How to update cells of this value type.
Source§fn get_value_type_id() -> ValueTypeId
fn get_value_type_id() -> ValueTypeId
Returns the type id of the value type.
impl NonLocalValue for DiskFileSystem
impl Upcast<Box<dyn FileSystem>> for DiskFileSystem
impl Upcast<Box<dyn ValueDebug>> for DiskFileSystem
impl Upcast<Box<dyn ValueToString>> for DiskFileSystem
Auto Trait Implementations§
impl Freeze for DiskFileSystem
impl !RefUnwindSafe for DiskFileSystem
impl Send for DiskFileSystem
impl Sync for DiskFileSystem
impl Unpin for DiskFileSystem
impl !UnwindSafe for DiskFileSystem
Blanket Implementations§
§impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more