code: def directories(self):
          
          dirlist_p = new_gp_object("CameraList")
          lib.gp_camera_folder_list_folders(self._cam._cam, self.path.encode(),
                                            dirlist_p, self._cam._ctx)
          for idx in range(lib.gp_list_count(dirlist_p)):
              name = os.path.join(
                  self.path, get_string(lib.gp_list_get_name, dirlist_p, idx))
              yield Directory(name=name, parent=self, camera=self._cam)
          lib.gp_list_free(dirlist_p)
docs: Get a generator that yields all subdirectories in the directory.