from pathlib import Path


def list_files(dirpath: str, pattern: str = "*.csv") -> list:
    """
    List files in a directory
    """
    file_names = list(Path(dirpath).glob(pattern))
    return file_names