summaryrefslogtreecommitdiff
path: root/python/filemetadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/filemetadata.py')
-rw-r--r--python/filemetadata.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/filemetadata.py b/python/filemetadata.py
index a8c738c2..0f74aa19 100644
--- a/python/filemetadata.py
+++ b/python/filemetadata.py
@@ -29,6 +29,7 @@ from .enums import SaveOption
from . import associateddatastore #required for _FileMetadataAssociatedDataStore
from .log import log_error
from . import binaryview
+from . import database
ProgressFuncType = Callable[[int, int], bool]
ViewName = str
@@ -245,6 +246,14 @@ class FileMetadata:
return binaryview.BinaryView(file_metadata = self, handle = view)
@property
+ def database(self) -> Optional['database.Database']:
+ """Gets the backing Database of the file"""
+ handle = core.BNGetFileMetadataDatabase(self.handle)
+ if handle is None:
+ return None
+ return database.Database(handle=handle)
+
+ @property
def saved(self) -> bool:
"""Boolean result of whether the file has been saved (Inverse of 'modified' property) (read/write)"""
return not core.BNIsFileModified(self.handle)