Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnFileEvCb ¶
type OnFileEvCb func(*WatchEvent)
type WatchEvent ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Example ¶
package main
import (
"fmt"
"github.com/noypi/filemon"
)
func main() {
// create a new watcher
w := filemon.NewWatcher(func(ev *filemon.WatchEvent) {
fmt.Println(ev)
})
// watch the current path
w.Watch("./")
// wait for a ctrl+c
w.WaitForKill()
}
Output:
func NewWatcher ¶
func NewWatcher(cb OnFileEvCb) *Watcher
func (*Watcher) RemoveWatch ¶
func (Watcher) WaitForKill ¶
func (this Watcher) WaitForKill()
Click to show internal directories.
Click to hide internal directories.
