for event := range eventstream {
// Only count relevant events
if event.Name == testDir || event.Name == testFile {
- if event.IsAttribute() {
+ if event.IsModify() {
attribReceived++
}
t.Logf("event received: %s", event)
func (e *FileEvent) IsCreate() bool { return (e.mask & FS_CREATE) == FS_CREATE}\r
\r
// IsDelete reports whether the FileEvent was triggerd by a delete\r
-func (e *FileEvent) IsDelete() bool { return ((e.mask & FS_DELETE) == FS_DELETE || (e.mask & FS_DELETE_SELF) == FS_DELETE_SELF }\r
+func (e *FileEvent) IsDelete() bool { return ((e.mask & FS_DELETE) == FS_DELETE || (e.mask & FS_DELETE_SELF) == FS_DELETE_SELF) }\r
\r
-// IsModify reports whether the FileEvent was triggerd by a file modification\r
-func (e *FileEvent) IsModify() bool { return (e.mask & FS_MODIFY) == FS_MODIFY }\r
-\r
-// IsAttribute reports whether the FileEvent was triggerd by a change of attributes\r
-func (e *FileEvent) IsAttribute() bool { return (e.mask & FS_ATTRIB) == FS_ATTRIB }\r
+// IsModify reports whether the FileEvent was triggerd by a file modification or attribute change\r
+func (e *FileEvent) IsModify() bool { return ((e.mask & FS_MODIFY) == FS_MODIFY || (e.mask & FS_ATTRIB) == FS_ATTRIB) }\r
\r
// IsRename reports whether the FileEvent was triggerd by a change name\r
func (e *FileEvent) IsRename() bool { return ((e.mask & FS_MOVE) == FS_MOVE || (e.mask & FS_MOVE_SELF) == FS_MOVE_SELF || (e.mask & FS_MOVED_FROM) == FS_MOVED_FROM || (e.mask & FS_MOVED_TO) == FS_MOVED_TO) }\r