summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2020-01-23 16:38:15 -0500
committerJosh Ferrell <josh@vector35.com>2020-02-06 15:24:27 -0500
commit7486332d5b38180520a889509c8fb0e09896bc98 (patch)
tree3d1a1502b54ce1597401364248756381c9a10a07 /python/binaryview.py
parentec29fc6e601d91c10027ed9277a8bc89f8e5bc7d (diff)
Add unit tests and update binaryview save
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 146c2394..cefdabce 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -2318,28 +2318,30 @@ class BinaryView(object):
"""
return False
- def create_database(self, filename, progress_func=None):
+ def create_database(self, filename, progress_func=None, clean=False):
"""
``create_database`` writes the current database (.bndb) file out to the specified file.
:param str filename: path and filename to write the bndb to, this string `should` have ".bndb" appended to it.
:param callback progress_func: optional function to be called with the current progress and total count.
+ :param bool clean: optional argument to determine if undo data is saved in the database.
:return: true on success, false on failure
:rtype: bool
"""
- return self._file.create_database(filename, progress_func)
+ return self._file.create_database(filename, progress_func, clean)
- def save_auto_snapshot(self, progress_func=None):
+ def save_auto_snapshot(self, progress_func=None, clean=False):
"""
``save_auto_snapshot`` saves the current database to the already created file.
.. note:: :py:meth:`create_database` should have been called prior to executing this method
:param callback progress_func: optional function to be called with the current progress and total count.
+ :param bool clean: optional argument to determine if undo data is saved in the database.
:return: True if it successfully saved the snapshot, False otherwise
:rtype: bool
"""
- return self._file.save_auto_snapshot(progress_func)
+ return self._file.save_auto_snapshot(progress_func, clean)
def get_view_of_type(self, name):
"""