From: Chris Howey Date: Fri, 30 Mar 2012 20:54:12 +0000 (-0500) Subject: Windows does not support attribute notifications - See README X-Git-Tag: v1.7.2~442 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=27e53530eaa8beab2da2a376e73e5abd57dfd62c;p=fsnotify.git Windows does not support attribute notifications - See README --- diff --git a/README b/README index c27a19d..8b9b813 100644 --- a/README +++ b/README @@ -19,4 +19,12 @@ Example: } Issues: -Windows does not seem to have an attribute change notification +It appears that windows does not have an attribute change notification +http://msdn.microsoft.com/en-us/library/windows/desktop/aa364391(v=vs.85).aspx + +Notifications: +IsCreate() +IsDelete() +IsModify() +IsAttribute() * NOT SUPPORTED ON WINDOWS * +IsRename() diff --git a/fsnotify_windows.go b/fsnotify_windows.go index 3f90aa2..1af4079 100644 --- a/fsnotify_windows.go +++ b/fsnotify_windows.go @@ -30,7 +30,7 @@ type FileEvent struct { func (e *FileEvent) IsCreate() bool { return (e.mask & FS_CREATE) == FS_CREATE} // IsDelete reports whether the FileEvent was triggerd by a delete -func (e *FileEvent) IsDelete() bool { return (e.mask & FS_DELETE) == FS_DELETE } +func (e *FileEvent) IsDelete() bool { return ((e.mask & FS_DELETE) == FS_DELETE || (e.mask & FS_DELETE_SELF) == FS_DELETE_SELF } // IsModify reports whether the FileEvent was triggerd by a file modification func (e *FileEvent) IsModify() bool { return (e.mask & FS_MODIFY) == FS_MODIFY }