Skip to content

It is only wrapper about github.com/fsnotify/fsnotify

License

Notifications You must be signed in to change notification settings

arturoeanton/go-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-notify

Example

package main

import (
	"log"

	notify "github.com/arturoeanton/go-notify"
)

func main() {
	data := make(chan string)
	fx := func(observer *notify.ObserverNotify, event *notify.Event) {
		log.Println(observer.Filename, "  ", event.Name, "  ", event.Op.String())
	}

	notify.NewObserverNotify("./", "test.txt").
		FxCreate(fx).
		FxWrite(fx).
		FxChmod(fx).
		FxRemove(fx).
		FxRename(fx).
		Run()

	<-data
}

About

It is only wrapper about github.com/fsnotify/fsnotify

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages