(
    package: Package,
    resource: Resource,
)
return (
        _path_from_reader(reader, _common.normalize_path(resource))
        if reader
        else _common.as_file(
            _common.files(package).joinpath(_common.normalize_path(resource))
        )
    )
A context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
A context manager providing a file path object to the resource.
A context manager providing a file path object to the resource .
def path(
    package: Package,
    resource: Resource,
) -> 'ContextManager[Path]':
    """A context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    """
    reader = _common.get_resource_reader(_common.get_package(package))
    return (
        _path_from_reader(reader, _common.normalize_path(resource))
        if reader
        else _common.as_file(
            _common.files(package).joinpath(_common.normalize_path(resource))
        )
    )
def path ( package : Package , resource : Resource , ) -> 'ContextManager[Path]' : reader = _common . get_resource_reader ( _common . get_package ( package ) ) return ( _path_from_reader ( reader , _common . normalize_path ( resource ) ) if reader else _common . as_file ( _common . files ( package ) . joinpath ( _common . normalize_path ( resource ) ) ) )