From ec29fc6e601d91c10027ed9277a8bc89f8e5bc7d Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Thu, 23 Jan 2020 15:23:07 -0500 Subject: Add clean saving --- python/filemetadata.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python') diff --git a/python/filemetadata.py b/python/filemetadata.py index b18ef5b3..9e6e6fd1 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -325,13 +325,13 @@ class FileMetadata(object): def navigate(self, view, offset): return core.BNNavigate(self.handle, str(view), offset) - def create_database(self, filename, progress_func = None): + def create_database(self, filename, progress_func = None, clean = False): if progress_func is None: - return core.BNCreateDatabase(self.raw.handle, str(filename)) + return core.BNCreateDatabase(self.raw.handle, str(filename), clean) else: return core.BNCreateDatabaseWithProgress(self.raw.handle, str(filename), None, ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)( - lambda ctxt, cur, total: progress_func(cur, total))) + lambda ctxt, cur, total: progress_func(cur, total)), clean) def open_existing_database(self, filename, progress_func = None): if progress_func is None: @@ -350,13 +350,13 @@ class FileMetadata(object): return None return binaryninja.binaryview.BinaryView(file_metadata = self, handle = view) - def save_auto_snapshot(self, progress_func = None): + def save_auto_snapshot(self, progress_func = None, clean = False): if progress_func is None: - return core.BNSaveAutoSnapshot(self.raw.handle) + return core.BNSaveAutoSnapshot(self.raw.handle, clean) else: return core.BNSaveAutoSnapshotWithProgress(self.raw.handle, None, ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)( - lambda ctxt, cur, total: progress_func(cur, total))) + lambda ctxt, cur, total: progress_func(cur, total)), clean) def get_view_of_type(self, name): view = core.BNGetFileViewOfType(self.handle, str(name)) -- cgit v1.3.1