]> go.fuhry.dev Git - fsnotify.git/commitdiff
Event struct has the same definition across every OS
authorNathan Youngman <git@nathany.com>
Fri, 20 Jun 2014 02:55:57 +0000 (20:55 -0600)
committerNathan Youngman <git@nathany.com>
Fri, 20 Jun 2014 02:55:57 +0000 (20:55 -0600)
CHANGELOG.md
fsnotify.go
fsnotify_bsd.go
fsnotify_linux.go
fsnotify_windows.go

index 6da0c9a166db13767af109e24da96d1692d60be5..c40479b81b5762944e583f2c431a5257b3c77ab1 100644 (file)
@@ -2,8 +2,9 @@
 
 ## v0.12.0 / 2014-06-19
 
-* use syscall.ERROR_MORE_DATA from ztypes_windows (Go 1.3+)
-* [internal] remove cookie from Event struct (unused)
+* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally).
+* [internal] remove cookie from Event struct (unused).
+* [internal] Event struct has the same definition across every OS.
 
 ## v0.11.0 / 2014-06-12
 
index 22e105ef1f4c3da4133f0056a56a9391cbd64c90..200e61ad02479a4ffe66d3225dabb571fe7837e8 100644 (file)
@@ -7,6 +7,12 @@ package fsnotify
 
 import "fmt"
 
+// Event represents a single file system event.
+type Event struct {
+       Name string // Relative path to the file/directory.
+       Op   Op     // Platform-independent bitmask.
+}
+
 // Op describes a set of file operations.
 type Op uint32
 
index 24af8211840f4b1c3539b7b26564e0f3cce476d8..549b9e486583a289e7d4511bbb631a28b5ca7f0c 100644 (file)
@@ -33,11 +33,6 @@ const (
        keventWaitTime = 100e6
 )
 
-type Event struct {
-       Name string // Relative path to the file/directory.
-       Op   Op     // Platform-independent mask.
-}
-
 func newEvent(name string, mask uint32, create bool) *Event {
        e := new(Event)
        e.Name = name
index f9be710017043e5b58310314ff5f9c1a2d5286cd..1864824a1ed7cc8b8c2b54c49e0d75d455892e31 100644 (file)
@@ -56,11 +56,6 @@ const (
        sys_IN_UNMOUNT    uint32 = syscall.IN_UNMOUNT
 )
 
-type Event struct {
-       Name string // Relative path to the file/directory.
-       Op   Op     // Platform-independent mask.
-}
-
 func newEvent(name string, mask uint32) *Event {
        e := &Event{Name: name}
        if mask&sys_IN_CREATE == sys_IN_CREATE || mask&sys_IN_MOVED_TO == sys_IN_MOVED_TO {
index 8896edf8c6588be0cb6f29f0d79235973dfa8d79..77ba5e9445ca7f370c2a5de14fde5d73e3ea8fc9 100644 (file)
@@ -41,13 +41,6 @@ const (
        sys_FS_Q_OVERFLOW = 0x4000
 )
 
-// Event is the type of the notification messages
-// received on the watcher's Events channel.
-type Event struct {
-       Name string // Relative path to the file/directory.
-       Op   Op     // Platform-independent bitmask.
-}
-
 func newEvent(name string, mask uint32) *Event {
        e := &Event{Name: name}
        if mask&sys_FS_CREATE == sys_FS_CREATE {