Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFolderPathNotFound = errors.New("could not find a folder path for watcher")
)
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler interface { OnCreate(ctx context.Context, path string, fileInfo os.FileInfo) OnRemove(ctx context.Context, path string, fileInfo os.FileInfo) OnWrite(ctx context.Context, path string, fileInfo os.FileInfo) OnRename(ctx context.Context, path string, fileInfo os.FileInfo, oldPath string) OnMove(ctx context.Context, path string, fileInfo os.FileInfo, oldPath string) }
EventHandler
type FolderWatcher ¶
type FolderWatcher interface { RegisterHandler(handler EventHandler) AddFile(path string) error Watch(ctx context.Context) error Close() }
func New ¶
func New(configs ...Option) (FolderWatcher, error)
New creates an new instance of folder watcher
Click to show internal directories.
Click to hide internal directories.