Change the name of the node specified by where and name to newname. Parameters ---------- where, name These arguments work as in :meth:`File.get_node`, referencing the node to be acted upon. newname : str The new name to be assigne
(
self,
where: Node | str,
newname: str,
name: str | None = None,
overwrite: bool = False,
)
| 1826 | return self.get_node(path)._f_isvisible() |
| 1827 | |
| 1828 | def rename_node( |
| 1829 | self, |
| 1830 | where: Node | str, |
| 1831 | newname: str, |
| 1832 | name: str | None = None, |
| 1833 | overwrite: bool = False, |
| 1834 | ) -> None: |
| 1835 | """Change the name of the node specified by where and name to newname. |
| 1836 | |
| 1837 | Parameters |
| 1838 | ---------- |
| 1839 | where, name |
| 1840 | These arguments work as in |
| 1841 | :meth:`File.get_node`, referencing the node to be acted upon. |
| 1842 | newname : str |
| 1843 | The new name to be assigned to the node (a string). |
| 1844 | overwrite : bool |
| 1845 | Whether to recursively remove a node with the same |
| 1846 | newname if it already exists (not done by default). |
| 1847 | |
| 1848 | """ |
| 1849 | obj = self.get_node(where, name=name) |
| 1850 | obj._f_rename(newname, overwrite) |
| 1851 | |
| 1852 | def move_node( |
| 1853 | self, |