summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2026-01-30 14:04:22 -0500
committerBrian Potchik <brian@vector35.com>2026-01-30 14:04:22 -0500
commitc674599c102adee1882ccb6778e9c819dfccd305 (patch)
treee4aaa5f07378f6e20c57be22ddd20580ce7788f7 /python
parent3c8ce87f45512006f6f2d6818235e1531ac92ab5 (diff)
Improve filename handling for container files.
Diffstat (limited to 'python')
-rw-r--r--python/filemetadata.py8
-rw-r--r--python/transform.py5
2 files changed, 10 insertions, 3 deletions
diff --git a/python/filemetadata.py b/python/filemetadata.py
index 48ac9065..810d4d17 100644
--- a/python/filemetadata.py
+++ b/python/filemetadata.py
@@ -210,7 +210,13 @@ class FileMetadata:
@property
def virtual_path(self) -> str:
- """The virtual path of the file including container and internal path (e.g., 'archive.zip:folder/file.bin') (read/write)"""
+ """
+ ``virtual_path`` is a logical (non-filesystem) path that describes how this file was derived from container transform system.
+
+ This path records provenance for files extracted from the transform system. It may include a sequence of transform steps and selection names.
+
+ .. note:: An empty `virtual_path` indicates the file has not yet been processed by the transform system. If `virtual_path` matches `filename`, the file is not the result of an extraction or transform.
+ """
return core.BNGetVirtualPath(self.handle)
@virtual_path.setter
diff --git a/python/transform.py b/python/transform.py
index d7f4202f..74279bce 100644
--- a/python/transform.py
+++ b/python/transform.py
@@ -681,15 +681,16 @@ class TransformContext:
return None
return TransformContext(child)
- def create_child(self, data: databuffer.DataBuffer, filename: str = "", result: TransformResult = TransformResult.TransformSuccess, message: str = "") -> 'TransformContext':
+ def create_child(self, data: databuffer.DataBuffer, filename: str = "", result: TransformResult = TransformResult.TransformSuccess, message: str = "", filename_is_descriptor: bool = False) -> 'TransformContext':
"""Create a new child context with the given data, filename, result status, and message
:param data: The data for the child context
:param filename: The filename for the child context (default: "")
:param result: Transform result for the child (default: TransformResult.TransformSuccess)
:param message: Extraction message for the child (default: "")
+ :param filename_is_descriptor: Whether the filename is a descriptor that should be combined with parent (default: False)
"""
- child = core.BNTransformContextSetChild(self.handle, data.handle, filename, result, message)
+ child = core.BNTransformContextSetChild(self.handle, data.handle, filename, result, message, filename_is_descriptor)
if child is None:
raise RuntimeError("Failed to create child context")
return TransformContext(child)