]> go.fuhry.dev Git - fsnotify.git/commitdiff
Get fsnotify to build clean on Solaris
authorAmit Krishnan <amit.krishnan@oracle.com>
Thu, 10 Mar 2016 01:19:56 +0000 (17:19 -0800)
committerNathan Youngman <git@nathany.com>
Thu, 10 Mar 2016 03:45:13 +0000 (20:45 -0700)
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
closes #128

AUTHORS
README.md
example_test.go
fen.go [new file with mode: 0644]
fsnotify.go

diff --git a/AUTHORS b/AUTHORS
index 6b0b68719aec947f5bd5ec0b5af49a8b7bdc7641..6438bb31cebf530f2747ff2525c8ea7a63014f74 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -9,6 +9,7 @@
 # Please keep the list sorted.
 
 Adrien Bustany <adrien@bustany.org>
+Amit Krishnan <amit.krishnan@oracle.com>
 Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
 Caleb Spare <cespare@gmail.com>
 Case Nelson <case@teammating.com>
index ba184c06392b4ccf68932048ce6e396304893c9e..fee2a36ba416a175c9c55d957bfc672cf5bf9807 100644 (file)
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Cross platform: Windows, Linux, BSD and OS X.
 |kqueue    |BSD, OS X, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
 |ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|
 |FSEvents  |OS X          |[Planned](https://github.com/fsnotify/fsnotify/issues/11)|
-|FEN       |Solaris 11    |[Planned](https://github.com/fsnotify/fsnotify/issues/12)|
+|FEN       |Solaris 11    |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)|
 |fanotify  |Linux 2.6.37+ | |
 |USN Journals |Windows    |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)|
 |Polling   |*All*         |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)|
index d65cdf3cfe2f4f75c3171a7faa93c46c233e6f72..700502cb3ac3aef0fe2fbffe78d7e21df707dd28 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9,!solaris
+// +build !plan9
 
 package fsnotify_test
 
diff --git a/fen.go b/fen.go
new file mode 100644 (file)
index 0000000..ced39cb
--- /dev/null
+++ b/fen.go
@@ -0,0 +1,37 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build solaris
+
+package fsnotify
+
+import (
+       "errors"
+)
+
+// Watcher watches a set of files, delivering events to a channel.
+type Watcher struct {
+       Events chan Event
+       Errors chan error
+}
+
+// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
+func NewWatcher() (*Watcher, error) {
+       return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+       return nil
+}
+
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
+       return nil
+}
+
+// Remove stops watching the the named file or directory (non-recursively).
+func (w *Watcher) Remove(name string) error {
+       return nil
+}
index c899ee008387756f6fd6408d755849362a98c356..d1d39a0ebdbde13814a0d43769a18cecfa8bbac3 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9,!solaris
+// +build !plan9
 
 // Package fsnotify provides a platform-independent interface for file system notifications.
 package fsnotify