code: func (t *deviceDownloadState) Update(folder string, updates []protocol.FileDownloadProgressUpdate) {
  	if t == nil {
  		return
  	}
  	t.mut.RLock()
  	f, ok := t.folders[folder]
  	t.mut.RUnlock()
  
  	if !ok {
  		f = &deviceFolderDownloadState{
  			mut:   sync.NewRWMutex(),
  			files: make(map[string]deviceFolderFileDownloadState),
  		}
  		t.mut.Lock()
  		t.folders[folder] = f
  		t.mut.Unlock()
  	}
  
  	f.Update(updates)
  }
docs: // Update updates internal state of what has been downloaded into the temporary
  // files by the remote device for this specific folder.