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

Method download_database_with_progress

rust/src/collaboration/file.rs:467–482  ·  view source on GitHub ↗

TODO: This might be a bad helper... maybe remove... TODO: AsRef Download a remote file and save it to a BNDB at the given `path`.

(
        &self,
        path: S,
        progress: impl ProgressCallback,
    )

Source from the content-addressed store, hash-verified

465 // TODO: AsRef<Path>
466 /// Download a remote file and save it to a BNDB at the given `path`.
467 pub fn download_database_with_progress<S: BnStrCompatible>(
468 &self,
469 path: S,
470 progress: impl ProgressCallback,
471 ) -> Result<Ref<FileMetadata>, ()> {
472 let mut progress = progress.split(&[50, 50]);
473 let file = self.download_with_progress(path, progress.next_subpart().unwrap())?;
474 let database = file.database().ok_or(())?;
475 self.sync_with_progress(
476 &database,
477 DatabaseConflictHandlerFail,
478 NoNameChangeset,
479 progress.next_subpart().unwrap(),
480 )?;
481 Ok(file)
482 }
483
484 /// Completely sync a file, pushing/pulling/merging/applying changes
485 ///

Callers

nothing calls this directly

Calls 5

next_subpartMethod · 0.80
sync_with_progressMethod · 0.80
splitMethod · 0.45
databaseMethod · 0.45

Tested by

no test coverage detected