Get a list of all snapshots in the database (read-only)
(self)
| 258 | |
| 259 | @property |
| 260 | def snapshots(self) -> List[Snapshot]: |
| 261 | """Get a list of all snapshots in the database (read-only)""" |
| 262 | count = ctypes.c_ulonglong(0) |
| 263 | snapshots = core.BNGetDatabaseSnapshots(self.handle, count) |
| 264 | assert snapshots is not None |
| 265 | |
| 266 | result = [] |
| 267 | try: |
| 268 | for i in range(0, count.value): |
| 269 | handle = core.BNNewSnapshotReference(snapshots[i]) |
| 270 | result.append(Snapshot(handle=handle)) |
| 271 | return result |
| 272 | finally: |
| 273 | core.BNFreeSnapshotList(snapshots, count) |
| 274 | |
| 275 | @property |
| 276 | def current_snapshot(self) -> Optional[Snapshot]: |