MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / download_database

Method download_database

rust/src/collaboration/file.rs:457–462  ·  view source on GitHub ↗

Download a remote file and save it to a BNDB at the given `path`, returning the associated [`FileMetadata`].

(&self, path: S)

Source from the content-addressed store, hash-verified

455
456 /// Download a remote file and save it to a BNDB at the given `path`, returning the associated [`FileMetadata`].
457 pub fn download_database<S: BnStrCompatible>(&self, path: S) -> Result<Ref<FileMetadata>, ()> {
458 let file = self.download(path)?;
459 let database = file.database().ok_or(())?;
460 self.sync(&database, DatabaseConflictHandlerFail, NoNameChangeset)?;
461 Ok(file)
462 }
463
464 // TODO: This might be a bad helper... maybe remove...
465 // TODO: AsRef<Path>

Callers 1

test_project_syncFunction · 0.80

Calls 3

downloadMethod · 0.45
databaseMethod · 0.45
syncMethod · 0.45

Tested by 1

test_project_syncFunction · 0.64