]> go.fuhry.dev Git - fsnotify.git/commitdiff
Linux - roll attribute into modify
authorChris Howey <chris@howey.me>
Sat, 31 Mar 2012 00:05:19 +0000 (17:05 -0700)
committerChris Howey <chris@howey.me>
Sat, 31 Mar 2012 00:05:19 +0000 (17:05 -0700)
fsnotify_linux.go

index a4d64069270575d0628f1980e377102d3dd15de9..806f8ce72c83ec6fab62bb9be69453f524869237 100644 (file)
@@ -51,11 +51,8 @@ func (e *FileEvent) IsDelete() bool {
        return (e.mask&IN_DELETE_SELF) == IN_DELETE_SELF || (e.mask&IN_DELETE) == IN_DELETE
 }
 
-// IsModify reports whether the FileEvent was triggerd by a file modification
-func (e *FileEvent) IsModify() bool { return (e.mask & IN_MODIFY) == IN_MODIFY }
-
-// IsAttribute reports whether the FileEvent was triggerd by a change of attributes
-func (e *FileEvent) IsAttribute() bool { return (e.mask & IN_ATTRIB) == IN_ATTRIB }
+// IsModify reports whether the FileEvent was triggerd by a file modification or attribute change
+func (e *FileEvent) IsModify() bool { return ((e.mask & IN_MODIFY) == IN_MODIFY || (e.mask & IN_ATTRIB) == IN_ATTRIB) }
 
 // IsRename reports whether the FileEvent was triggerd by a change name
 func (e *FileEvent) IsRename() bool { return (e.mask & IN_MOVE_SELF) == IN_MOVE_SELF }