-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Itay Donanhirsh
committed
Mar 11, 2021
1 parent
c66f7c6
commit 62afbb6
Showing
5 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// +build !nofsnotify | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/fsnotify/fsnotify" | ||
) | ||
|
||
var ( | ||
fsnCreate = fsnotify.Create | ||
fsnWrite = fsnotify.Write | ||
fsnRemove = fsnotify.Remove | ||
fsnRename = fsnotify.Rename | ||
) | ||
|
||
var fsnNewWatcher = fsnotify.NewWatcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// +build nofsnotify | ||
|
||
package main | ||
|
||
import "errors" | ||
|
||
type Op uint32 | ||
|
||
const ( | ||
fsnCreate Op = iota | ||
fsnWrite | ||
fsnRemove | ||
fsnRename | ||
) | ||
|
||
type Event struct { | ||
Name string | ||
Op Op | ||
} | ||
|
||
type Watcher struct { | ||
Errors chan error | ||
Events chan Event | ||
} | ||
|
||
func (w *Watcher) Add(name string) error { return nil } | ||
func (w *Watcher) Close() error { return nil } | ||
|
||
func fsnNewWatcher() (*Watcher, error) { | ||
return nil, errors.New("fsnotify is not supported") | ||
} |