The ChangeDetector is responsible for determining if files have changed on disk. It gets told to Remember() files (name and modtime) and will then get asked if a file has been Seen() (i.e., Remember() has been called on it) and if any of the files have Changed(). To forget all files, call Reset().
| 114 | // called on it) and if any of the files have Changed(). To forget all |
| 115 | // files, call Reset(). |
| 116 | type ChangeDetector interface { |
| 117 | Remember(fs fs.Filesystem, name string, modtime time.Time) |
| 118 | Seen(fs fs.Filesystem, name string) bool |
| 119 | Changed() bool |
| 120 | Reset() |
| 121 | } |
| 122 | |
| 123 | type Matcher struct { |
| 124 | fs fs.Filesystem |
no outgoing calls
no test coverage detected