from pathlib import Path
from typing import List
import logging


def get_files(folder: Path, suffix=None) -> List[Path]:
    """Get all files contained in Path (optionally filtering for suffix)"""
    if isinstance(suffix, str):
        suffix = [suffix]
    path = Path.cwd() / folder
    if not path.is_dir():
        logging.warning(f"{path} does not exist or is not a directory")
        return []
    return [f for f in path.iterdir() if (f.is_file() and ((suffix is None) or (f.suffix in suffix)))]