from typing import List
from pathlib import Path


def list_paths_to_files_in_dir(path_to_dir: str) -> List[str]:
    """Return a list of the paths of only the files (not sub-directories) within a directory.

    :param path_to_dir: a str containing the path to the directory.
    :return: a list containing only the filenames in the directory.
    """

    # convert generator to list using the list() function.
    return list((str(file_or_dir) for file_or_dir in Path(path_to_dir).iterdir() if file_or_dir.is_file()))