import pathlib


def _get_sorted_paths(path, ext):
    """
    Return sorted names of files in directory with extension.

    Args:
        path (str): Path to directory.
        ext (str): Files extension.

    Returns:
        list: List of sorted files paths.

    """
    return list(
        map(
            lambda x: x.as_posix(), sorted(pathlib.Path(path).glob(f"*.{ext}"))
        )
    )