MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / folders

Method folders

python/collaboration/project.py:450–474  ·  view source on GitHub ↗

Get the list of folders in this project. .. 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. :return: List of Folder objects :raises: RuntimeError if there was an error pull

(self)

Source from the content-addressed store, hash-verified

448
449 @property
450 def folders(self) -> List['folder.RemoteFolder']:
451 """
452 Get the list of folders in this project.
453
454 .. note:: If the project has not been opened, it will be opened upon calling this.
455
456 .. note:: If folders have not been pulled, they will be pulled upon calling this.
457
458 :return: List of Folder objects
459 :raises: RuntimeError if there was an error pulling folders
460 """
461 if not self.open():
462 raise RuntimeError("Failed to open project")
463
464 if not self.has_pulled_folders:
465 self.pull_folders()
466
467 count = ctypes.c_size_t()
468 value = core.BNRemoteProjectGetFolders(self._handle, count)
469 if value is None:
470 raise RuntimeError(util._last_error())
471 result = []
472 for i in range(count.value):
473 result.append(folder.RemoteFolder(value[i]))
474 return result
475
476 def get_folder_by_id(self, id: str) -> Optional['folder.RemoteFolder']:
477 """

Callers

nothing calls this directly

Calls 4

openMethod · 0.95
pull_foldersMethod · 0.95
RemoteFolderMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected