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)
| 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 | """ |