MCPcopy Create free account
hub / github.com/RustPython/RustPython / move_into

Method move_into

Lib/pathlib/__init__.py:1194–1205  ·  view source on GitHub ↗

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

(self, target_dir)

Source from the content-addressed store, hash-verified

1192 return target
1193
1194 def move_into(self, target_dir):
1195 """
1196 Move this file or directory tree into the given existing directory.
1197 """
1198 name = self.name
1199 if not name:
1200 raise ValueError(f"{self!r} has an empty name")
1201 elif hasattr(target_dir, 'with_segments'):
1202 target = target_dir / name
1203 else:
1204 target = self.with_segments(target_dir, name)
1205 return self.move(target)
1206
1207 if hasattr(os, "symlink"):
1208 def symlink_to(self, target, target_is_directory=False):

Callers 1

test_move_intoMethod · 0.80

Calls 3

moveMethod · 0.95
hasattrFunction · 0.85
with_segmentsMethod · 0.45

Tested by 1

test_move_intoMethod · 0.64