MCPcopy
hub / github.com/syncthing/syncthing / Remove

Method Remove

lib/model/indexhandler.go:572–580  ·  view source on GitHub ↗

Remove stops a running index handler or removes one pending to be started. It is a noop if the folder isn't known.

(folder string)

Source from the content-addressed store, hash-verified

570// Remove stops a running index handler or removes one pending to be started.
571// It is a noop if the folder isn't known.
572func (r *indexHandlerRegistry) Remove(folder string) {
573 r.mut.Lock()
574 defer r.mut.Unlock()
575
576 l.Debugf("Removing index handler for device %v and folder %v", r.conn.DeviceID().Short(), folder)
577 r.indexHandlers.RemoveAndWait(folder, 0)
578 delete(r.startInfos, folder)
579 l.Debugf("Removed index handler for device %v and folder %v", r.conn.DeviceID().Short(), folder)
580}
581
582// RemoveAllExcept stops all running index handlers and removes those pending to be started,
583// except mentioned ones.

Callers 1

RegisterFolderStateMethod · 0.95

Calls 5

UnlockMethod · 0.80
DebugfMethod · 0.80
ShortMethod · 0.80
RemoveAndWaitMethod · 0.80
DeviceIDMethod · 0.65

Tested by

no test coverage detected