diff options
| author | Josh Ferrell <josh@vector35.com> | 2020-01-23 15:23:07 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2020-02-06 15:24:27 -0500 |
| commit | ec29fc6e601d91c10027ed9277a8bc89f8e5bc7d (patch) | |
| tree | 4df4e2040168932b27a085e1778a1c927c4dd30d /python/filemetadata.py | |
| parent | 53fecf0f3cd4557d284eb29a5a5ed96ba43f0b50 (diff) | |
Add clean saving
Diffstat (limited to 'python/filemetadata.py')
| -rw-r--r-- | python/filemetadata.py | 12 |
1 files changed, 6 insertions, 6 deletions
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)) |
