-
Notifications
You must be signed in to change notification settings - Fork 3
/
fsnotifyunsupported.go
45 lines (35 loc) · 1.09 KB
/
fsnotifyunsupported.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//go:build plan9 || solaris || js
// +build plan9 solaris js
package ui
import (
"errors"
)
// fsEvent represents a single file system notification.
type fsEvent struct {
Name string // Relative path to the file or directory.
Op fsOp // File operation that triggered the event.
}
// fsOp describes a set of file operations.
type fsOp uint32
var errFsNotifyNotSupported = errors.New("fsnotify is not supported for this platform")
// Watcher watches a set of files, delivering events to a channel.
type Watcher struct {
Events chan fsEvent
Errors chan error
}
// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
func newFsWatcher() (*Watcher, error) {
return nil, errFsNotifyNotSupported
}
// 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
}