parameters: (path)
docstring: Deletes a directory recursively, which must exist.
docstring_summary: Deletes a directory recursively, which must exist.
docstring_tokens: Deletes a directory recursively which must exist .
function: def _DeleteDir(path):
    """Deletes a directory recursively, which must exist."""
    # Don't use shutil.rmtree because it can't delete read-only files on Win.
    for root, dirs, files in os.walk(path, topdown=False):
      for name in files:
        filename = os.path.join(root, name)
        os.chmod(filename, stat.S_IWRITE)
        os.remove(filename)
      for name in dirs:
        os.rmdir(os.path.join(root, name))
    os.rmdir(path)
function_tokens: def _DeleteDir ( path ) : # Don't use shutil.rmtree because it can't delete read-only files on Win. for root , dirs , files in os . walk ( path , topdown = False ) : for name in files : filename = os . path . join ( root , name ) os . chmod ( filename , stat . S_IWRITE ) os . remove ( filename ) for name in dirs : os . rmdir ( os . path . join ( root , name ) ) os . rmdir ( path )