Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving `recursive` a true value; otherwise, a `NodeError` will be raised. If `force` is set to true, the node will be removed no matter it has children or not
(self, recursive: bool, force: bool)
| 503 | self._v_isopen = False |
| 504 | |
| 505 | def _g_remove(self, recursive: bool, force: bool) -> None: |
| 506 | """Remove this node from the hierarchy. |
| 507 | |
| 508 | If the node has children, recursive removal must be stated by |
| 509 | giving `recursive` a true value; otherwise, a `NodeError` will |
| 510 | be raised. |
| 511 | |
| 512 | If `force` is set to true, the node will be removed no matter it |
| 513 | has children or not (useful for deleting hard links). |
| 514 | |
| 515 | It does not log the change. |
| 516 | |
| 517 | """ |
| 518 | # Remove the node from the PyTables hierarchy. |
| 519 | parent = self._v_parent |
| 520 | parent._g_unrefnode(self._v_name) |
| 521 | # Close the node itself. |
| 522 | self._f_close() |
| 523 | # hdf5extension operations: |
| 524 | # Remove the node from the HDF5 hierarchy. |
| 525 | self._g_delete(parent) |
| 526 | |
| 527 | def _f_remove(self, recursive: bool = False, force: bool = False) -> None: |
| 528 | """Remove this node from the hierarchy. |