Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.
/ dirwatch Public archive

watching for changes inside a directory and all sub-directories, recursively

License

Notifications You must be signed in to change notification settings

workshop-depot/dirwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dirwatch

For watching for changes inside a directory and all sub-directories, recursively. Uses the package fsnotify.

Documentation:

GoDoc

Sample Usage

notify := func(ev Event) {
	// processing the event ev
}

// create the watcher which excludes
// any folder along the added paths
// that matches provided pattern(s).
watcher := New(Notify(notify), Exclude("/*/*/node_modules"))
defer watcher.Stop()
watcher.Add(dir1, true)
watcher.Add(dir2, false)
watcher.Add(dir3, true)

Environment:

  • Ubuntu 18.04
  • Go 1.10.3

TODO:

  • more tests

About

watching for changes inside a directory and all sub-directories, recursively

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages