Watch talks from the 2019 TensorFlow Dev Summit Watch now

tf.io.gfile.rename

tf.io.gfile.rename(
    src,
    dst,
    overwrite=False
)

Defined in tensorflow/python/lib/io/file_io.py.

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.