Get a specific Folder in the Project by its id .. note:: If the project has not been opened, it will be opened upon calling this. .. note:: If folders have not been pulled, they will be pulled upon calling this. :param id: Id of Folder :return: Folder object, if one with that id exists
(self, id: str)
| 474 | return result |
| 475 | |
| 476 | def get_folder_by_id(self, id: str) -> Optional['folder.RemoteFolder']: |
| 477 | """ |
| 478 | Get a specific Folder in the Project by its id |
| 479 | |
| 480 | .. note:: If the project has not been opened, it will be opened upon calling this. |
| 481 | |
| 482 | .. note:: If folders have not been pulled, they will be pulled upon calling this. |
| 483 | |
| 484 | :param id: Id of Folder |
| 485 | :return: Folder object, if one with that id exists. Else, None |
| 486 | :raises: RuntimeError if there was an error pulling folders |
| 487 | """ |
| 488 | if not self.open(): |
| 489 | raise RuntimeError("Failed to open project") |
| 490 | |
| 491 | if not self.has_pulled_folders: |
| 492 | self.pull_folders() |
| 493 | |
| 494 | value = core.BNRemoteProjectGetFolderById(self._handle, id) |
| 495 | if value is None: |
| 496 | return None |
| 497 | return folder.RemoteFolder(value) |
| 498 | |
| 499 | def pull_folders(self, progress: 'util.ProgressFuncType' = util.nop): |
| 500 | """ |
nothing calls this directly
no test coverage detected