code: func (t readWriteTransaction) updateLocalNeed(keyBuf, folder, name []byte, fl VersionList, global protocol.FileInfo) []byte {
  	keyBuf = t.keyer.GenerateNeedFileKey(keyBuf, folder, name)
  	hasNeeded, _ := t.Has(keyBuf, nil)
  	if localFV, haveLocalFV := fl.Get(protocol.LocalDeviceID[:]); need(global, haveLocalFV, localFV.Version) {
  		if !hasNeeded {
  			l.Debugf("local need insert; folder=%q, name=%q", folder, name)
  			t.Put(keyBuf, nil)
  		}
  	} else if hasNeeded {
  		l.Debugf("local need delete; folder=%q, name=%q", folder, name)
  		t.Delete(keyBuf)
  	}
  	return keyBuf
  }
docs: // updateLocalNeed checks whether the given file is still needed on the local
  // device according to the version list and global FileInfo given and updates
  // the db accordingly.