from pathlib import Path
import glob


def get_file_path(directory: str, filename: str) -> Path:
    """Resolves a filename and directory, returns a Path."""
    try:
        path = list(Path(directory).glob(glob.escape(filename)+".*"))[0]
    except IndexError:
        raise ValueError("File does not exist!")
    return path