Skip to content

nocdev80/go-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-notify

Example

package main

import (
	"log"

	notify "github.com/nocv80/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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages