Recursively create files and folders in the project from a path on disk :param path: Path to folder on disk :param parent: Parent folder in the project that will contain the new contents :param description: Description for created root folder :param progress_func: Progress function that
(self, path: Union[PathLike, str], parent: Optional[ProjectFolder] = None, description: str = "", progress_func: ProgressFuncType = _nop)
| 469 | core.BNProjectRemoveMetadata(self._handle, key) |
| 470 | |
| 471 | def create_folder_from_path(self, path: Union[PathLike, str], parent: Optional[ProjectFolder] = None, description: str = "", progress_func: ProgressFuncType = _nop) -> ProjectFolder: |
| 472 | """ |
| 473 | Recursively create files and folders in the project from a path on disk |
| 474 | |
| 475 | :param path: Path to folder on disk |
| 476 | :param parent: Parent folder in the project that will contain the new contents |
| 477 | :param description: Description for created root folder |
| 478 | :param progress_func: Progress function that will be called |
| 479 | :return: Created root folder |
| 480 | """ |
| 481 | parent_handle = parent._handle if parent is not None else None |
| 482 | folder_handle = core.BNProjectCreateFolderFromPath( |
| 483 | project=self._handle, |
| 484 | path=str(path), |
| 485 | parent=parent_handle, |
| 486 | description=description, |
| 487 | ctxt=None, |
| 488 | progress=_wrap_progress(progress_func) |
| 489 | ) |
| 490 | |
| 491 | if folder_handle is None: |
| 492 | raise ProjectException("Failed to create folder") |
| 493 | |
| 494 | return ProjectFolder(handle=folder_handle) |
| 495 | |
| 496 | def create_folder(self, parent: Optional[ProjectFolder], name: str, description: str = "") -> ProjectFolder: |
| 497 | """ |
nothing calls this directly
no test coverage detected