Look up the [`RemoteFile`] for a local [`BinaryView`], or None if there is no matching remote File found.
(bv: &BinaryView)
| 49 | /// Look up the [`RemoteFile`] for a local [`BinaryView`], or None if there is no matching |
| 50 | /// remote File found. |
| 51 | pub fn get_for_binary_view(bv: &BinaryView) -> Result<Option<Ref<RemoteFile>>, ()> { |
| 52 | let file = bv.file(); |
| 53 | let Some(database) = file.database() else { |
| 54 | return Ok(None); |
| 55 | }; |
| 56 | RemoteFile::get_for_local_database(&database) |
| 57 | } |
| 58 | |
| 59 | pub fn core_file(&self) -> Result<ProjectFile, ()> { |
| 60 | let result = unsafe { BNRemoteFileGetCoreFile(self.handle.as_ptr()) }; |