from pathlib import Path


def all_files(dir, pattern):
    """Recursively finds every file in 'dir' whose name matches 'pattern'."""
    return [f.as_posix() for f in [x for x in Path(dir).rglob(pattern)]]