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

Method pull_files

python/collaboration/project.py:362–380  ·  view source on GitHub ↗

Pull the list of files from the Remote. .. 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 progress: Function to call for progress updates :raises: RuntimeError if t

(self, progress: 'util.ProgressFuncType' = util.nop)

Source from the content-addressed store, hash-verified

360 return file.RemoteFile(value)
361
362 def pull_files(self, progress: 'util.ProgressFuncType' = util.nop):
363 """
364 Pull the list of files from the Remote.
365
366 .. note:: If the project has not been opened, it will be opened upon calling this.
367
368 .. note:: If folders have not been pulled, they will be pulled upon calling this.
369
370 :param progress: Function to call for progress updates
371 :raises: RuntimeError if there was an error pulling files
372 """
373 if not self.open():
374 raise RuntimeError("Failed to open project")
375
376 if not self.has_pulled_folders:
377 self.pull_folders()
378
379 if not core.BNRemoteProjectPullFiles(self._handle, util.wrap_progress(progress), None):
380 raise RuntimeError(util._last_error())
381
382 def create_file(self, filename: str, contents: bytes, name: str, description: str, parent_folder: Optional['folder.RemoteFolder'] = None,
383 file_type: enums.RemoteFileType = enums.RemoteFileType.BinaryViewAnalysisFileType, progress: 'util.ProgressFuncType' = util.nop) -> 'file.RemoteFile':

Callers 4

filesMethod · 0.95
get_file_by_idMethod · 0.95
get_file_by_nameMethod · 0.95

Calls 2

openMethod · 0.95
pull_foldersMethod · 0.95

Tested by

no test coverage detected