def files(self):
        """ Get a generator that yields all files in the directory. """
        filelist_p = new_gp_object("CameraList")
        lib.gp_camera_folder_list_files(self._cam._cam, self.path.encode(),
                                        filelist_p, self._cam._ctx)
        for idx in range(lib.gp_list_count(filelist_p)):
            fname = get_string(lib.gp_list_get_name, filelist_p, idx)
            yield File(name=fname, directory=self, camera=self._cam)
        lib.gp_list_free(filelist_p)
def files ( self ) : filelist_p = new_gp_object ( "CameraList" ) lib . gp_camera_folder_list_files ( self . _cam . _cam , self . path . encode ( ) , filelist_p , self . _cam . _ctx ) for idx in range ( lib . gp_list_count ( filelist_p ) ) : fname = get_string ( lib . gp_list_get_name , filelist_p , idx ) yield File ( name = fname , directory = self , camera = self . _cam ) lib . gp_list_free ( filelist_p )
Get a generator that yields all files in the directory.