def discover(path):
    file_list = []
    libraw = LibRaw()
    raw = libraw.libraw_init(0)

    for root, _, files in os.walk(path):
        for file_name in files:
            file_path = os.path.join(root, file_name).encode('ascii')
            try:
                libraw.libraw_open_file(raw, file_path)
            except FileUnsupported:
                continue
            finally:
                libraw.libraw_recycle(raw)
            file_list.append(file_path)

    libraw.libraw_close(raw)
    return file_list
Recursively search for raw files in a given directory.
dataset/ETHPy150Open photoshell/rawkit/rawkit/util.py/discover