Trait zombienet_support::fs::FileSystem
source · pub trait FileSystem {
// Required methods
fn create_dir<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn create_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn read<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = FileSystemResult<Vec<u8>>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn read_to_string<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = FileSystemResult<String>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn write<'life0, 'async_trait, P, C>(
&'life0 self,
path: P,
contents: C,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
C: AsRef<[u8]> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn append<'life0, 'async_trait, P, C>(
&'life0 self,
path: P,
contents: C,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
C: AsRef<[u8]> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn copy<'life0, 'async_trait, P1, P2>(
&'life0 self,
from: P1,
to: P2,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P1: AsRef<Path> + Send + 'async_trait,
P2: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn set_mode<'life0, 'async_trait, P>(
&'life0 self,
path: P,
perm: u32,
) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn exists<'life0, 'async_trait, P>(
&'life0 self,
path: P,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
fn create_dir<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn create_dir_all<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn read<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<Vec<u8>>> + Send + 'async_trait>>
fn read_to_string<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<String>> + Send + 'async_trait>>
fn write<'life0, 'async_trait, P, C>( &'life0 self, path: P, contents: C, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn append<'life0, 'async_trait, P, C>( &'life0 self, path: P, contents: C, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn copy<'life0, 'async_trait, P1, P2>( &'life0 self, from: P1, to: P2, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn set_mode<'life0, 'async_trait, P>( &'life0 self, path: P, perm: u32, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn exists<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.