Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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))