MCPcopy Index your code
hub / github.com/endbasic/endbasic / setup_storage

Function setup_storage

web/src/lib.rs:198–204  ·  view source on GitHub ↗

Sets up the common storage drives.

(storage: &mut endbasic_std::storage::Storage)

Source from the content-addressed store, hash-verified

196
197/// Sets up the common storage drives.
198fn setup_storage(storage: &mut endbasic_std::storage::Storage) {
199 storage.register_scheme("demos", Box::from(endbasic_repl::demos::DemoDriveFactory::default()));
200 storage.mount("demos", "demos://").expect("Demos drive shouldn't fail to mount");
201 storage.register_scheme("local", Box::from(WebDriveFactory::default()));
202 storage.mount("local", "local://").expect("Web drive shouldn't fail to mount");
203 storage.cd("local:").expect("Local drive was just registered");
204}
205
206/// Connects the EndBASIC interpreter to a web page.
207#[wasm_bindgen]

Callers 1

safe_run_repl_loopMethod · 0.70

Calls 3

register_schemeMethod · 0.80
mountMethod · 0.80
cdMethod · 0.80

Tested by

no test coverage detected