MCPcopy
hub / github.com/syncthing/syncthing / restartWatch

Method restartWatch

lib/model/folder.go:1037–1041  ·  view source on GitHub ↗

restartWatch should only ever be called synchronously. If you want to use this asynchronously, you should probably use scheduleWatchRestart instead.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1035// restartWatch should only ever be called synchronously. If you want to use
1036// this asynchronously, you should probably use scheduleWatchRestart instead.
1037func (f *folder) restartWatch(ctx context.Context) error {
1038 f.stopWatch()
1039 f.startWatch(ctx)
1040 return f.scanSubdirs(ctx, nil)
1041}
1042
1043// startWatch should only ever be called synchronously. If you want to use
1044// this asynchronously, you should probably use scheduleWatchRestart instead.

Callers 1

ServeMethod · 0.95

Calls 3

stopWatchMethod · 0.95
startWatchMethod · 0.95
scanSubdirsMethod · 0.95

Tested by

no test coverage detected