MCPcopy Index your code
hub / github.com/RustPython/RustPython / copy_into

Method copy_into

Lib/pathlib/__init__.py:1106–1117  ·  view source on GitHub ↗

Copy this file or directory tree into the given existing directory.

(self, target_dir, **kwargs)

Source from the content-addressed store, hash-verified

1104 return target.joinpath() # Empty join to ensure fresh metadata.
1105
1106 def copy_into(self, target_dir, **kwargs):
1107 """
1108 Copy this file or directory tree into the given existing directory.
1109 """
1110 name = self.name
1111 if not name:
1112 raise ValueError(f"{self!r} has an empty name")
1113 elif hasattr(target_dir, 'with_segments'):
1114 target = target_dir / name
1115 else:
1116 target = self.with_segments(target_dir, name)
1117 return self.copy(target, **kwargs)
1118
1119 def _copy_from(self, source, follow_symlinks=True, preserve_metadata=False):
1120 """

Callers 1

test_copy_intoMethod · 0.45

Calls 3

copyMethod · 0.95
hasattrFunction · 0.85
with_segmentsMethod · 0.45

Tested by 1

test_copy_intoMethod · 0.36