Copy the children of a group into another group. Parameters ---------- srcgroup : str The group to copy from. dstgroup : str The destination group. overwrite : bool, optional If True, the destination group will be overwritt
(
self,
srcgroup: str,
dstgroup: str,
overwrite: bool = False,
recursive: bool = False,
createparents: bool = False,
**kwargs,
)
| 2075 | srcobject._v_attrs._f_copy(dstobject) |
| 2076 | |
| 2077 | def copy_children( |
| 2078 | self, |
| 2079 | srcgroup: str, |
| 2080 | dstgroup: str, |
| 2081 | overwrite: bool = False, |
| 2082 | recursive: bool = False, |
| 2083 | createparents: bool = False, |
| 2084 | **kwargs, |
| 2085 | ) -> None: |
| 2086 | """Copy the children of a group into another group. |
| 2087 | |
| 2088 | Parameters |
| 2089 | ---------- |
| 2090 | srcgroup : str |
| 2091 | The group to copy from. |
| 2092 | dstgroup : str |
| 2093 | The destination group. |
| 2094 | overwrite : bool, optional |
| 2095 | If True, the destination group will be overwritten if it already |
| 2096 | exists. Defaults to False. |
| 2097 | recursive : bool, optional |
| 2098 | If True, all descendant nodes of srcgroup are recursively copied. |
| 2099 | Defaults to False. |
| 2100 | createparents : bool, optional |
| 2101 | If True, any necessary parents of dstgroup will be created. |
| 2102 | Defaults to False. |
| 2103 | kwargs : dict |
| 2104 | Additional keyword arguments can be used to customize the copying |
| 2105 | process. See the documentation of :meth:`Group._f_copy_children` |
| 2106 | for a description of those arguments. |
| 2107 | |
| 2108 | """ |
| 2109 | srcgroup = self.get_node(srcgroup) # Does the source node exist? |
| 2110 | self._check_group(srcgroup) # Is it a group? |
| 2111 | |
| 2112 | srcgroup._f_copy_children( |
| 2113 | dstgroup, overwrite, recursive, createparents, **kwargs |
| 2114 | ) |
| 2115 | |
| 2116 | def copy_file( |
| 2117 | self, dstfilename: str, overwrite: bool = False, **kwargs |