MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / replace

Method replace

tools/python-3.11.9-amd64/Lib/pathlib.py:1178–1189  ·  view source on GitHub ↗

Rename this path to the target path, overwriting if that path exists. The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, *not* the directory of the Path object. Returns the new Path

(self, target)

Source from the content-addressed store, hash-verified

1176 return self.__class__(target)
1177
1178 def replace(self, target):
1179 """
1180 Rename this path to the target path, overwriting if that path exists.
1181
1182 The target path may be absolute or relative. Relative paths are
1183 interpreted relative to the current working directory, *not* the
1184 directory of the Path object.
1185
1186 Returns the new Path instance pointing to the target path.
1187 """
1188 os.replace(self, target)
1189 return self.__class__(target)
1190
1191 def symlink_to(self, target, target_is_directory=False):
1192 """

Callers 15

_quoteMethod · 0.45
__calc_date_timeMethod · 0.45
__init__Method · 0.45
_write_fstring_innerMethod · 0.45
_write_constantMethod · 0.45
currencyFunction · 0.45
delocalizeFunction · 0.45
_replace_encodingFunction · 0.45
normalizeFunction · 0.45
locale.pyFile · 0.45
translateFunction · 0.45
openMethod · 0.45

Calls 1

__class__Method · 0.45

Tested by 1

_find_optionsMethod · 0.36