watcher

package
v0.0.0-...-147f0cf Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package watcher that handles file renames

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchFile

func WatchFile(path string,
	handler func() error) (*fsnotify.Watcher, error)

WatchFile is a resilient file watcher that handles file renames Special features:

  1. This debounces multiple quick changes before invoking the callback
  2. After the callback, resubscribe to the file to handle file renames that change the file inode path to watch handler to invoke on change

This returns the fsnotify watcher. Close it when done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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