From 27e53530eaa8beab2da2a376e73e5abd57dfd62c Mon Sep 17 00:00:00 2001 From: Chris Howey Date: Fri, 30 Mar 2012 15:54:12 -0500 Subject: [PATCH] Windows does not support attribute notifications - See README --- README | 10 +++++++++- fsnotify_windows.go | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) 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 } -- 2.50.1