FileMetadata in binaryninja::file_metadata - Rust

Source

pub fn new() -> Ref<Self>

Source

pub fn with_filename(name: &str) -> Ref<Self>

Source

pub fn close(&self)

Source

pub fn session_id(&self) -> usize

Source

pub fn filename(&self) -> String

Source

pub fn set_filename(&self, name: &str)

Source

pub fn modified(&self) -> bool

Source

pub fn mark_modified(&self)

Source

pub fn mark_saved(&self)

Source

pub fn is_analysis_changed(&self) -> bool

Source

pub fn is_database_backed(&self) -> bool

Source

pub fn is_database_backed_for_view_type(&self, view_type: &str) -> bool

Source

pub fn run_undoable_transaction<F: FnOnce() -> Result<T, E>, T, E>( &self, func: F, ) -> Result<T, E>

Runs a failable function where the failure state will revert any undo actions that occurred during the time of the function’s execution.

NOTE: This will commit or undo any actions that occurred on any thread as this state is not thread local.

NOTE: This is NOT thread safe, if you are holding any locks that might be held by both the main thread and the thread executing this function, you can deadlock. You should also never call this function on multiple threads at a time. See the following issues:

Source

pub fn begin_undo_actions(&self, anonymous_allowed: bool) -> String

Source

pub fn commit_undo_actions(&self, id: &str)

Source

pub fn revert_undo_actions(&self, id: &str)

Source

pub fn forget_undo_actions(&self, id: &str)

Source

pub fn undo(&self)

Source

pub fn redo(&self)

Source

pub fn current_view(&self) -> String

Source

pub fn current_offset(&self) -> u64

Source

pub fn navigate_to(&self, view: &str, offset: u64) -> Result<(), ()>

Navigate to an offset for a specific view.

§Example
use binaryninja::file_metadata::FileMetadata;
file.navigate_to("Linear:Raw", 0x0).expect("Linear:Raw should always be present");
Source

pub fn view_of_type(&self, view: &str) -> Option<Ref<BinaryView>>

Get the BinaryView for the view type.

§Example
use binaryninja::file_metadata::FileMetadata;
file.view_of_type("Raw").expect("Raw type should always be present");
Source

pub fn view_types(&self) -> Array<BnString>

Source

pub fn project_file(&self) -> Option<Ref<ProjectFile>>

Source

pub fn create_database(&self, file_path: impl AsRef<Path>) -> bool

Source

pub fn create_database_with_progress<P: ProgressCallback>( &self, file_path: impl AsRef<Path>, progress: P, ) -> bool

Source

pub fn save_auto_snapshot(&self) -> bool

Source

pub fn open_database_for_configuration( &self, file: &Path, ) -> Result<Ref<BinaryView>, ()>

Source

pub fn open_database(&self, file: &Path) -> Result<Ref<BinaryView>, ()>

Source

pub fn open_database_with_progress<P: ProgressCallback>( &self, file: &Path, progress: P, ) -> Result<Ref<BinaryView>, ()>

Source

pub fn database(&self) -> Option<Ref<Database>>

Get the current database