MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / rename

Function rename

tensorflow/python/lib/io/file_io.py:490–502  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

488
489@tf_export(v1=["gfile.Rename"])
490def 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")

Callers 2

RenameFileMethod · 0.85

Calls 1

rename_v2Function · 0.85

Tested by

no test coverage detected