import pathlib


def get_paths(input_dir, glob_ext='*.*', recursive=False):
    """Return a list of the paths of all files in the given directory"""
    if recursive:
        glob_ext = '**/' + glob_ext
    data_root = pathlib.Path(input_dir)
    all_paths = list(data_root.glob(glob_ext))
    all_paths = [str(path) for path in all_paths]
    return all_paths