def is_resource(package: Package, name: str) -> bool:
    """True if `name` is a resource inside `package`.

    Directories are *not* resources.
    """
    resource = normalize_path(name)
    return any(
        traversable.name == resource and traversable.is_file()
        for traversable in _common.files(package).iterdir()
    )
True if `name` is a resource inside `package`.

    Directories are *not* resources.
    
product/gradle-plugin/src/main/python/setuptools/_vendor/importlib_resources/_legacy.py