]>
go.fuhry.dev Git - fsnotify.git/commit
Add {Event,Op}.Has() (#477)
Using:
if event.Op&fsnotify.Create == fsnotify.Create {
}
is overly verbose and awkward; a Has() method makes this much nicer:
if event.Has(fsnotify.Create) {
}
PR #76 was previously rejected; I think that HasCreate() etc. is
overkill, but a Has() method makes the library quite a bit more
convenient IMO.
I added it to both the Event and Op to avoid confusion; with this we can
change the Op field to be private in a future v2.
Fixes #107