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

Method files

python/project.py:619–638  ·  view source on GitHub ↗

Get a list of files in the project :return: List of files in the project

(self)

Source from the content-addressed store, hash-verified

617
618 @property
619 def files(self) -> List[ProjectFile]:
620 """
621 Get a list of files in the project
622
623 :return: List of files in the project
624 """
625 count = ctypes.c_size_t()
626 value = core.BNProjectGetFiles(self._handle, count)
627 if value is None:
628 raise ProjectException("Failed to get list of project files")
629 result = []
630 try:
631 for i in range(count.value):
632 file_handle = core.BNNewProjectFileReference(value[i])
633 if file_handle is None:
634 raise ProjectException("core.BNNewProjectFileReference returned None")
635 result.append(ProjectFile(file_handle))
636 return result
637 finally:
638 core.BNFreeProjectFileList(value, count.value)
639
640 def get_file_by_id(self, id: str) -> Optional[ProjectFile]:
641 """

Callers

nothing calls this directly

Calls 3

ProjectExceptionClass · 0.70
ProjectFileClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected