code: func (m *model) RemoteNeedFolderFiles(device protocol.DeviceID, folder string, page, perpage int) ([]db.FileInfoTruncated, error) {
  	m.fmut.RLock()
  	m.pmut.RLock()
  	err := m.checkDeviceFolderConnectedLocked(device, folder)
  	rf := m.folderFiles[folder]
  	m.pmut.RUnlock()
  	m.fmut.RUnlock()
  	if err != nil {
  		return nil, err
  	}
  
  	files := make([]db.FileInfoTruncated, 0, perpage)
  	skip := (page - 1) * perpage
  	get := perpage
  	rf.WithNeedTruncated(device, func(f db.FileIntf) bool {
  		if skip > 0 {
  			skip--
  			return true
  		}
  		files = append(files, f.(db.FileInfoTruncated))
  		get--
  		return get > 0
  	})
  
  	return files, nil
  }
docs: // RemoteNeedFolderFiles returns paginated list of currently needed files in
  // progress, queued, and to be queued on next puller iteration, as well as the
  // total number of files currently needed.