pub trait FileSystem: Clone {
// Required methods
fn read<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, KclError>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait;
fn read_to_string<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<String, KclError>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait;
fn exists<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<bool, KclError>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait;
fn get_all_files<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>, KclError>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
Sourcefn read<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, KclError>> + Send + 'async_trait>>
fn read<'life0, 'async_trait, P>( &'life0 self, path: P, source_range: SourceRange, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, KclError>> + Send + 'async_trait>>
Read a file from the local file system.
Sourcefn read_to_string<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<String, KclError>> + Send + 'async_trait>>
fn read_to_string<'life0, 'async_trait, P>( &'life0 self, path: P, source_range: SourceRange, ) -> Pin<Box<dyn Future<Output = Result<String, KclError>> + Send + 'async_trait>>
Read a file from the local file system.
Sourcefn exists<'life0, 'async_trait, P>(
&'life0 self,
path: P,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<bool, KclError>> + Send + 'async_trait>>
fn exists<'life0, 'async_trait, P>( &'life0 self, path: P, source_range: SourceRange, ) -> Pin<Box<dyn Future<Output = Result<bool, KclError>> + Send + 'async_trait>>
Check if a file exists on the local file system.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.