summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-02-14 16:24:00 -0500
committerGlenn Smith <glenn@vector35.com>2024-02-19 17:01:23 -0500
commit2911628937552644687336352361767840783854 (patch)
tree6afd4660db7c511abee0d5cb02c07a9396e6999d /python/binaryview.py
parenta155071981b401f72fa3dad4626c7a891ff8f761 (diff)
Clean up type archives docs
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index cfce2c96..ec8475c8 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -7791,8 +7791,9 @@ class BinaryView:
def attach_type_archive(self, archive: 'typearchive.TypeArchive'):
"""
- Attach a given type archive to the owned analysis and try to connect to it.
- Names from that archive will be cached in the mapping but no types will actually be associated by calling this.
+ Attach a given type archive to the analysis and try to connect to it.
+ If attaching was successful, names from that archive will become available to pull,
+ but no types will actually be associated by calling this.
:param archive: New archive
"""
attached = self.attach_type_archive_by_id(archive.id, archive.path)
@@ -7801,18 +7802,22 @@ class BinaryView:
def attach_type_archive_by_id(self, id: str, path: str) -> Optional['typearchive.TypeArchive']:
"""
Attach a type archive to the owned analysis and try to connect to it.
- If attaching was successful, names from that archive will be cached in the mapping,
+ If attaching was successful, names from that archive will become available to pull,
but no types will actually be associated by calling this.
- The behavior of this function is rather complicated, in an attempt to enable
- control of both attaching and connecting Type Archives.
+ The behavior of this function is rather complicated, in an attempt to enable the
+ ability to have attached, but disconnected Type Archives.
+
+ Normal operation:
- If there was a previously connected Type Archive whose id matches `id`, nothing
- will happen and it will simply be returned.
If there was no previously connected Type Archive whose id matches `id`, and the
file at `path` contains a Type Archive whose id matches `id`, it will be
attached and connected.
+ Edge-cases:
+
+ If there was a previously connected Type Archive whose id matches `id`, nothing
+ will happen, and it will simply be returned.
If the file at `path` does not exist, nothing will happen and None will be returned.
If the file at `path` exists but does not contain a Type Archive whose id matches `id`,
nothing will happen and None will be returned.
@@ -7832,14 +7837,14 @@ class BinaryView:
def detach_type_archive(self, archive: 'typearchive.TypeArchive'):
"""
- Detach from a type archive, breaking all associations to types with the archive
+ Detach from a type archive, breaking all associations to types within the archive
:param archive: Type archive to detach
"""
self.detach_type_archive_by_id(archive.id)
def detach_type_archive_by_id(self, id: str):
"""
- Detach from a type archive, breaking all associations to types with the archive
+ Detach from a type archive, breaking all associations to types within the archive
:param id: Id of archive to detach
"""
if not core.BNBinaryViewDetachTypeArchive(self.handle, id):