Move this path to target.
(self, target)
| 400 | f.close() |
| 401 | |
| 402 | def move(self, target): |
| 403 | """Move this path to target.""" |
| 404 | if target.relto(self): |
| 405 | raise error.EINVAL(target, "cannot move path into a subdirectory of itself") |
| 406 | try: |
| 407 | self.rename(target) |
| 408 | except error.EXDEV: # invalid cross-device link |
| 409 | self.copy(target) |
| 410 | self.remove() |
| 411 | |
| 412 | def fnmatch(self, pattern): |
| 413 | """Return true if the basename/fullname matches the glob-'pattern'. |