def __get_files(dir_name, extensions):

    # Expand out the directory
    dir_name = os.path.abspath(os.path.expanduser(dir_name))

    myfiles = []

    for sub_ext in extensions:
        globstr = os.path.join(dir_name, '*' + os.path.extsep + sub_ext)
        myfiles.extend(glob.glob(globstr))

    return myfiles
Helper function to get files in a single directory
dataset/ETHPy150Open bmcfee/librosa/librosa/util/files.py/__get_files