ChangeNotify can subscribe multiple callers this is coupled with the wrapped fs ChangeNotify (if it supports it) and also notifies other caches (i.e VFS) to clear out whenever something changes
(ctx context.Context, notifyFunc func(string, fs.EntryType), pollInterval <-chan time.Duration)
| 883 | // this is coupled with the wrapped fs ChangeNotify (if it supports it) |
| 884 | // and also notifies other caches (i.e VFS) to clear out whenever something changes |
| 885 | func (f *Fs) ChangeNotify(ctx context.Context, notifyFunc func(string, fs.EntryType), pollInterval <-chan time.Duration) { |
| 886 | f.parentsForgetMu.Lock() |
| 887 | defer f.parentsForgetMu.Unlock() |
| 888 | fs.Debugf(f, "subscribing to ChangeNotify") |
| 889 | f.parentsForgetFn = append(f.parentsForgetFn, notifyFunc) |
| 890 | go func() { |
| 891 | for range pollInterval { |
| 892 | } |
| 893 | }() |
| 894 | } |
| 895 | |
| 896 | // Name of the remote (as passed into NewFs) |
| 897 | func (f *Fs) Name() string { |