From: Chris Howey Date: Sat, 31 Mar 2012 00:09:12 +0000 (-0500) Subject: BSD - roll attribute into modify X-Git-Tag: v1.7.2~439 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=a9691b00ba1c04e21f3f30c8e716545af3f33797;p=fsnotify.git BSD - roll attribute into modify --- diff --git a/fsnotify_bsd.go b/fsnotify_bsd.go index 03f24de..0d8e0e5 100644 --- a/fsnotify_bsd.go +++ b/fsnotify_bsd.go @@ -50,10 +50,7 @@ func (e *FileEvent) IsCreate() bool { return e.create } func (e *FileEvent) IsDelete() bool { return (e.mask & NOTE_DELETE) == NOTE_DELETE } // IsModify reports whether the FileEvent was triggerd by a file modification -func (e *FileEvent) IsModify() bool { return (e.mask & NOTE_WRITE) == NOTE_WRITE } - -// IsAttribute reports whether the FileEvent was triggerd by a change of attributes -func (e *FileEvent) IsAttribute() bool { return (e.mask & NOTE_ATTRIB) == NOTE_ATTRIB } +func (e *FileEvent) IsModify() bool { return ((e.mask & NOTE_WRITE) == NOTE_WRITE || (e.mask & NOTE_ATTRIB) == NOTE_ATTRIB) } // IsRename reports whether the FileEvent was triggerd by a change name func (e *FileEvent) IsRename() bool { return (e.mask & NOTE_RENAME) == NOTE_RENAME }