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

Method create_folder

python/collaboration/project.py:514–534  ·  view source on GitHub ↗

Create a new folder on the remote (and pull it) .. note:: If the project has not been opened, it will be opened upon calling this. :param name: Displayed folder name :param description: Folder description :param parent: Parent folder (optional) :param progress: Function to call on upl

(self, name: str, description: str, parent: Optional['folder.RemoteFolder'] = None, progress: 'util.ProgressFuncType' = util.nop)

Source from the content-addressed store, hash-verified

512 raise RuntimeError(util._last_error())
513
514 def create_folder(self, name: str, description: str, parent: Optional['folder.RemoteFolder'] = None, progress: 'util.ProgressFuncType' = util.nop) -> 'folder.RemoteFolder':
515 """
516 Create a new folder on the remote (and pull it)
517
518 .. note:: If the project has not been opened, it will be opened upon calling this.
519
520 :param name: Displayed folder name
521 :param description: Folder description
522 :param parent: Parent folder (optional)
523 :param progress: Function to call on upload progress updates
524 :return: Reference to the created folder
525 :raises: RuntimeError if there was an error pulling folders
526 """
527 if not self.open():
528 raise RuntimeError("Failed to open project")
529
530 parent_handle = parent._handle if parent is not None else None
531 value = core.BNRemoteProjectCreateFolder(self._handle, name, description, parent_handle, util.wrap_progress(progress), None)
532 if value is None:
533 raise RuntimeError(util._last_error())
534 return folder.RemoteFolder(value)
535
536 def push_folder(self, folder: 'folder.RemoteFolder', extra_fields: Optional[Dict[str, str]] = None):
537 """

Callers 1

mainFunction · 0.45

Calls 2

openMethod · 0.95
RemoteFolderMethod · 0.80

Tested by

no test coverage detected