MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / Add

Method Add

pkg/unpackerr/folder.go:280–294  ·  view source on GitHub ↗

Add uses either fsnotify or watcher.

(folder string)

Source from the content-addressed store, hash-verified

278
279// Add uses either fsnotify or watcher.
280func (f *Folders) Add(folder string) error {
281 if f.Interval >= minimumPollInterval {
282 if err := f.Watcher.Add(folder); err != nil {
283 return fmt.Errorf("watcher: %w", err)
284 }
285
286 return nil
287 }
288
289 if err := f.FSNotify.Add(folder); err != nil {
290 return fmt.Errorf("fsnotify: %w", err)
291 }
292
293 return nil
294}
295
296// Remove uses either fsnotify or watcher.
297func (f *Folders) Remove(folder string) {

Callers 6

saveEventMethod · 0.95
newWatcherMethod · 0.80
folderXtractrCallbackMethod · 0.80
updateMetricsMethod · 0.80
handleXtractrCallbackMethod · 0.80
retrieveAppQueuesMethod · 0.80

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected