parameters: (dir)
docstring: Deletes and recreates the dir to make sure it is clean.
  
    Args:
      dir: The directory to clean.
docstring_summary: Deletes and recreates the dir to make sure it is clean.
docstring_tokens: Deletes and recreates the dir to make sure it is clean .
function: def cleanDir(dir):
    """Deletes and recreates the dir to make sure it is clean.
  
    Args:
      dir: The directory to clean.
    """
    try:
      shutil.rmtree(dir)
    except OSError:
      if os.path.exists(dir):
        raise
      else:
        pass
    os.makedirs(dir, 0775)
function_tokens: def cleanDir ( dir ) : try : shutil . rmtree ( dir ) except OSError : if os . path . exists ( dir ) : raise else : pass os . makedirs ( dir , 0775 )