def recursive_create_dir(dirname): """Create a directory and all parent/intermediate directories. Args: dirname: string, name of the directory to be created Raises: errors.OpError: If the operation fails. """ with errors.raise_exception_on_not_ok_status() as status: pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status)
def recursive_create_dir_v2(path): """Creates a directory and all parent/intermediate directories. It succeeds if path already exists and is writable. Args: path: string, name of the directory to be created Raises: errors.OpError: If the operation fails. """ pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(path))