Get the list of snapshots in this file. .. note:: If snapshots have not been pulled, they will be pulled upon calling this. :return: List of Snapshot objects :raises: RuntimeError if there was an error pulling snapshots
(self)
| 294 | |
| 295 | @property |
| 296 | def snapshots(self) -> List['snapshot.CollabSnapshot']: |
| 297 | """ |
| 298 | Get the list of snapshots in this file. |
| 299 | |
| 300 | .. note:: If snapshots have not been pulled, they will be pulled upon calling this. |
| 301 | |
| 302 | :return: List of Snapshot objects |
| 303 | :raises: RuntimeError if there was an error pulling snapshots |
| 304 | """ |
| 305 | if not self.has_pulled_snapshots: |
| 306 | self.pull_snapshots() |
| 307 | |
| 308 | count = ctypes.c_size_t() |
| 309 | value = core.BNRemoteFileGetSnapshots(self._handle, count) |
| 310 | if value is None: |
| 311 | raise RuntimeError(util._last_error()) |
| 312 | result = [] |
| 313 | for i in range(count.value): |
| 314 | result.append(snapshot.CollabSnapshot(value[i])) |
| 315 | return result |
| 316 | |
| 317 | def get_snapshot_by_id(self, id: str) -> Optional['snapshot.CollabSnapshot']: |
| 318 | """ |
nothing calls this directly
no test coverage detected