from pathlib import Path


def index(directory: str) -> list:
    """
    Index all files from directory (including all subdirectories).
    :param directory: directory to index.
    :return: list containing all files found into given directory.
    """

    path = Path(directory)
    return [p for p in path.expanduser().iterdir()]