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 instanc
(self, target)
| 1079 | return target |
| 1080 | |
| 1081 | def replace(self, target): |
| 1082 | """ |
| 1083 | Rename this path to the target path, overwriting if that path exists. |
| 1084 | |
| 1085 | The target path may be absolute or relative. Relative paths are |
| 1086 | interpreted relative to the current working directory, *not* the |
| 1087 | directory of the Path object. |
| 1088 | |
| 1089 | Returns the new Path instance pointing to the target path. |
| 1090 | """ |
| 1091 | os.replace(self, target) |
| 1092 | if not hasattr(target, 'with_segments'): |
| 1093 | target = self.with_segments(target) |
| 1094 | return target |
| 1095 | |
| 1096 | def copy(self, target, **kwargs): |
| 1097 | """ |
no test coverage detected