sonotify

package
v0.0.0-...-d9d0c30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

* @Author: soso * @Date: 2022-01-29 15:15:04 * @LastEditTime: 2022-02-09 16:44:38 * @LastEditors: Please set LastEditors * @Description: 监控目录 * @FilePath: /sync-client/sonotify/sonotify.go

Index

Constants

View Source
const (
	ActCreate = "CREATE"
	ActRemove = "REMOVE"
	ActRename = "RENAME"
	ActWrite  = "WRITE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Watch

type Watch struct {
	// contains filtered or unexported fields
}

func NewDirWatch

func NewDirWatch() (watch *Watch, err error)

func (*Watch) Close

func (w *Watch) Close() error

清除所有监控

func (*Watch) WatchDir

func (w *Watch) WatchDir(dir string, cbfunc func(act fsnotify.Op, filePath string))

监控目录

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL