Copies data from `oldpath` to `newpath`. Args: oldpath: string, name of the file who's contents need to be copied newpath: string, name of the file to which to copy to overwrite: boolean, if false it's an error for `newpath` to be occupied by an existing file. Raises: err
(oldpath, newpath, overwrite=False)
| 455 | |
| 456 | @tf_export(v1=["gfile.Copy"]) |
| 457 | def copy(oldpath, newpath, overwrite=False): |
| 458 | """Copies data from `oldpath` to `newpath`. |
| 459 | |
| 460 | Args: |
| 461 | oldpath: string, name of the file who's contents need to be copied |
| 462 | newpath: string, name of the file to which to copy to |
| 463 | overwrite: boolean, if false it's an error for `newpath` to be occupied by |
| 464 | an existing file. |
| 465 | |
| 466 | Raises: |
| 467 | errors.OpError: If the operation fails. |
| 468 | """ |
| 469 | copy_v2(oldpath, newpath, overwrite) |
| 470 | |
| 471 | |
| 472 | @tf_export("io.gfile.copy") |