Documentation ¶
Overview ¶
Copyright 2020 The Go Authors and UGO Authors
Package ugoSpectator implements a simple library to watch files on the directory specified.
Methods:
Init() (*UgoSpectator, error) Close() error
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UgoSpectator ¶
type UgoSpectator struct { Watcher *fsnotify.Watcher // *fsnotify watcher instance Ch chan bool // ch to trigger on file change CancelCtx context.CancelFunc // context to cancel // contains filtered or unexported fields }
UgoSpectator struct with Watcher and all methods
func Init ¶
func Init(dirname string) (*UgoSpectator, error)
Init initializes the fsnotify NewWatcher and
a *fsnotify watcher instance and an error
func (*UgoSpectator) Close ¶
func (u *UgoSpectator) Close() error
Close return error if an error occurs during the closing of the fsnotify watcher instance
Click to show internal directories.
Click to hide internal directories.