from typing import List
from pathlib import Path


def get_files(directory: str, extension: str) -> List[str]:
    """
    Get a list of files with a given extension.
    :param directory: path to directory.
    :param extension: extension for file filtering -
    only files with this extension will be preserved.
    :return: list of file paths.
    """
    dir_path = Path(directory)
    files = [str(path) for path in sorted(dir_path.rglob("*." + extension))]
    return files