Skip to main content

FileSystem

Trait FileSystem 

Source
pub trait FileSystem: Send + Sync {
    // Required method
    fn execute(
        &self,
        request: FileRequest,
    ) -> Pin<Box<dyn Future<Output = Result<FileResponse, JsError>> + 'static>>;
}
Expand description

A host filesystem confined to one app’s private data root. Requests contain normalized relative paths; implementations must not follow links outside that root and must enforce the supplied read bounds.

Required Methods§

Source

fn execute( &self, request: FileRequest, ) -> Pin<Box<dyn Future<Output = Result<FileResponse, JsError>> + 'static>>

Runs an operation without blocking the engine thread.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§