python/ray/_private/runtime_env/packaging.py
def delete_package(pkg_uri: str, base_directory: str) -> Tuple[bool, int]:
    """Deletes a specific URI from the local filesystem.

    Args:
        pkg_uri (str): URI to delete.

    Returns:
        bool: True if the URI was successfully deleted, else False.
    """

    deleted = False
    path = Path(_get_local_path(base_directory, pkg_uri))
    with FileLock(str(path) + ".lock"):
        path = path.with_suffix("")
        if path.exists():
            if path.is_dir() and not path.is_symlink():
                shutil.rmtree(str(path))
            else:
                path.unlink()
            deleted = True

    return deleted
Deletes a specific URI from the local filesystem.

    Args:
        pkg_uri (str): URI to delete.

    Returns:
        bool: True if the URI was successfully deleted, else False.
    
Deletes a specific URI from the local filesystem.
Deletes a specific URI from the local filesystem .
def delete_package(pkg_uri: str, base_directory: str) -> Tuple[bool, int]:
    deleted = False
    path = Path(_get_local_path(base_directory, pkg_uri))
    with FileLock(str(path) + ".lock"):
        path = path.with_suffix("")
        if path.exists():
            if path.is_dir() and not path.is_symlink():
                shutil.rmtree(str(path))
            else:
                path.unlink()
            deleted = True
    return deleted
def delete_package ( pkg_uri : str , base_directory : str ) -> Tuple [ bool , int ] : deleted = False path = Path ( _get_local_path ( base_directory , pkg_uri ) ) with FileLock ( str ( path ) + ".lock" ) : path = path . with_suffix ( "" ) if path . exists ( ) : if path . is_dir ( ) and not path . is_symlink ( ) : shutil . rmtree ( str ( path ) ) else : path . unlink ( ) deleted = True return deleted
Deletes a specific URI from the local filesystem.
Deletes a specific URI from the local filesystem .
"""Deletes a specific URI from the local filesystem.

    Args:
        pkg_uri (str): URI to delete.

    Returns:
        bool: True if the URI was successfully deleted, else False.
    """
True if the URI was successfully deleted, else False.
True if the URI was successfully deleted else False .
bool
pkg_uri
str
URI to delete.
URI to delete .
base_directory
str