zombienet_support::fs

Trait 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§

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

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.

Implementors§