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

Function rename_v2

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

Rename or move a file / directory. Args: src: string, pathname for a file dst: string, pathname to which the file needs to be moved overwrite: boolean, if false it's an error for `dst` to be occupied by an existing file. Raises: errors.OpError: If the operation fails.

(src, dst, overwrite=False)

Source from the content-addressed store, hash-verified

504
505@tf_export("io.gfile.rename")
506def rename_v2(src, dst, overwrite=False):
507 """Rename or move a file / directory.
508
509 Args:
510 src: string, pathname for a file
511 dst: string, pathname to which the file needs to be moved
512 overwrite: boolean, if false it's an error for `dst` to be occupied by an
513 existing file.
514
515 Raises:
516 errors.OpError: If the operation fails.
517 """
518 pywrap_tensorflow.RenameFile(
519 compat.as_bytes(src), compat.as_bytes(dst), overwrite)
520
521
522def atomic_write_string_to_file(filename, contents, overwrite=True):

Callers 1

renameFunction · 0.85

Calls 1

RenameFileMethod · 0.45

Tested by

no test coverage detected