Rename or move a file / directory. Args: oldname: string, pathname for a file newname: string, pathname to which the file needs to be moved overwrite: boolean, if false it's an error for `newname` to be occupied by an existing file. Raises: errors.OpError: If the operatio
(oldname, newname, overwrite=False)
| 488 | |
| 489 | @tf_export(v1=["gfile.Rename"]) |
| 490 | def rename(oldname, newname, overwrite=False): |
| 491 | """Rename or move a file / directory. |
| 492 | |
| 493 | Args: |
| 494 | oldname: string, pathname for a file |
| 495 | newname: string, pathname to which the file needs to be moved |
| 496 | overwrite: boolean, if false it's an error for `newname` to be occupied by |
| 497 | an existing file. |
| 498 | |
| 499 | Raises: |
| 500 | errors.OpError: If the operation fails. |
| 501 | """ |
| 502 | rename_v2(oldname, newname, overwrite) |
| 503 | |
| 504 | |
| 505 | @tf_export("io.gfile.rename") |
no test coverage detected