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

Method get_for_local_database

rust/src/collaboration/file.rs:41–47  ·  view source on GitHub ↗

Look up the remote File for a local database, or None if there is no matching remote File found. See [RemoteFile::get_for_binary_view] to load from a [BinaryView].

(database: &Database)

Source from the content-addressed store, hash-verified

39 /// remote File found.
40 /// See [RemoteFile::get_for_binary_view] to load from a [BinaryView].
41 pub fn get_for_local_database(database: &Database) -> Result<Option<Ref<RemoteFile>>, ()> {
42 // TODO: This sync should be removed?
43 if !sync::pull_files(database)? {
44 return Ok(None);
45 }
46 sync::get_remote_file_for_local_database(database)
47 }
48
49 /// Look up the [`RemoteFile`] for a local [`BinaryView`], or None if there is no matching
50 /// remote File found.

Callers

nothing calls this directly

Calls 2

pull_filesFunction · 0.85

Tested by

no test coverage detected