MCPcopy Create free account
hub / github.com/BitVM/BitVM / get_object

Method get_object

bridge/src/client/data_store/local_file.rs:48–59  ·  view source on GitHub ↗
(
        &self,
        file_name: &str,
        file_path: Option<&str>,
    )

Source from the content-addressed store, hash-verified

46 }
47
48 async fn get_object(
49 &self,
50 file_name: &str,
51 file_path: Option<&str>,
52 ) -> std::io::Result<Vec<u8>> {
53 let path = match file_path {
54 Some(file_path) => self.base_path.join(file_path).join(file_name),
55 None => self.base_path.join(file_name),
56 };
57
58 std::fs::read(path)
59 }
60
61 async fn upload_object(
62 &self,

Callers 2

fetch_objectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected