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

Method insert

python/workflow.py:492–506  ·  view source on GitHub ↗

``insert`` Insert the list of ``activities`` before the specified ``activity`` and at the same level. :param str activity: the Activity node for which to insert ``activities`` before :param list[str] activities: the list of Activities to insert :return: True on success, False otherwise :

(self, activity: ActivityType, activities: Union[List[str], str])

Source from the content-addressed store, hash-verified

490 return core.BNWorkflowClear(self.handle)
491
492 def insert(self, activity: ActivityType, activities: Union[List[str], str]) -> bool:
493 """
494 ``insert`` Insert the list of ``activities`` before the specified ``activity`` and at the same level.
495
496 :param str activity: the Activity node for which to insert ``activities`` before
497 :param list[str] activities: the list of Activities to insert
498 :return: True on success, False otherwise
499 :rtype: bool
500 """
501 if isinstance(activities, str):
502 activities = [activities]
503 input_list = (ctypes.c_char_p * len(activities))()
504 for i in range(0, len(activities)):
505 input_list[i] = str(activities[i]).encode('charmap')
506 return core.BNWorkflowInsert(self.handle, str(activity), input_list, len(activities))
507
508 def insert_after(self, activity: ActivityType, activities: Union[List[str], str]) -> bool:
509 """

Callers 8

mainFunction · 0.45
_function_wrapperFunction · 0.45
write_at_cursorMethod · 0.45
mainFunction · 0.45
populate_nodesMethod · 0.45
apply_to_linesMethod · 0.45
apply_to_linesFunction · 0.45
cachePreviousLinesMethod · 0.45

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected