summaryrefslogtreecommitdiff
path: root/python/filemetadata.py
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2020-01-23 15:23:07 -0500
committerJosh Ferrell <josh@vector35.com>2020-02-06 15:24:27 -0500
commitec29fc6e601d91c10027ed9277a8bc89f8e5bc7d (patch)
tree4df4e2040168932b27a085e1778a1c927c4dd30d /python/filemetadata.py
parent53fecf0f3cd4557d284eb29a5a5ed96ba43f0b50 (diff)
Add clean saving
Diffstat (limited to 'python/filemetadata.py')
-rw-r--r--python/filemetadata.py12
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))