Initial commit
Multiple directory even monitoring works
Comments and code cleanup
Make RecursiveAdd() actually work
Refactor and cleanup
Add ListDescriptors() and RemoveDescriptor()
Update example to showcase the proper use of these functions
Forgot to add mutex locks in ListDescriptors() and RemoveDescriptor()
Forgot to add mutex lock to DescriptorExists()
Fix comment typo
Rename getWatchDescriptor() to GetDescriptorByWatch()
Added GetDescriptorByPath()
Added Stop() for stopping running watch descriptors
Added d.Running to check a descriptor's status
Added status checks to d.Stop() and d.Start()
Added w.StopAll() to stop all currently running WatchDescriptors
Added WatchDescriptor.DoesPathExist() that returns true if a descriptor's path exists, false otherwise
Fixed Watcher.RemoveDescriptor() to not try to remove an inotify watch of a file that has already been deleted, since inotify removes watches itself. So we just need to handle our own bookkeeping.
Refactor GetDescriptorByPath() to be a little less dumb
Added Name string to FsEvent structure. This is the name of the actual file associated with an event.
Updated example/example.go
Added some new higher level functions for getting event types:
IsDirEvent(): Returns true if the event happened to a directory
IsDirCreated(): Returns true if the event was a directory creation or a directory was moved into the root watch directory
IsDirRemoved(): Returns true if the event was a direction deletion or a directory was moved outside of the root watch directory
IsFileCreated(): Returns true if the event was a file being created or moved into the root watch directory
IsFileRemoved(): Returns true if the event was a file being deleted or moved outside of the root watch directory
Refactored event mask checking in helper functions using new CheckMask() function
Added IsRootMoved() and IsRootDeletion() helper functions
Added custom predefined event flags that work with the new event checking functions
Fixed fmt.Errorf() typo in fsevents.go
Add check to AddDescriptor() to make sure dirPath exists before trying to create a watch for it
Renamed/removed/added some error variables
Make IsRootDeletion() and IsRootMoved() compare the pathname of the event, and the root path of the watcher
Added fsevents_test.go
Formatting in fsevents.go Logging output in example/example.go
Return error from w.StopAll()
Added scripts/test/cover.sh and updated .gitignore
Added Event counter and helper functions. Simplified Watch().
Added ReadSingleEvent() with simplified event reading from inotify descriptor
Added tests for (most) event masks
Updated mask variables to uint32 to avoid conversion
Added EventHandle interface, RegisterEventHandle UnregisterEventHandle, getEventHandle and WatchAndHandle.
Updated example code to show new EventHandle interface usage
Refactored Stop and Start WatchDescriptor methods to not require the inotify file descriptor from the Watcher
Added ID field to FsEvent to allow for differentiation between events and discerning what event came when.
Split example code into examples/handle and examples/loop to show different ways to use go-fsevents
Added time.Time timestamp to FsEvent object
Changed FsEvent timestamp to UTC instead of local
Make UnregisterEventHandle return an error if we try to remove a handler that doesn't exit
Added support for go modules
Removed the unused 'RootPath' field from fsevents.Watcher Remove code adding a redundant watch descriptor for the argument RootPath to NewWatcher() using the argument Mask Changed the function signature of NewWatcher() to accept no arguments