From: Chris Howey Date: Sat, 31 Mar 2012 00:05:19 +0000 (-0700) Subject: Linux - roll attribute into modify X-Git-Tag: v1.7.2~440 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=feb423ed9332e2e189098737de148e4e82290ea0;p=fsnotify.git Linux - roll attribute into modify --- diff --git a/fsnotify_linux.go b/fsnotify_linux.go index a4d6406..806f8ce 100644 --- a/fsnotify_linux.go +++ b/fsnotify_linux.go @@ -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 }