fsnotify

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileWatcher

func FileWatcher() (chan struct{}, chan string)

FileWatcher returns two channels: one for file system events and one for extra files to watch.

The first channel emits a struct{}{} whenever a file is modified. The caller can use this channel to trigger a slide rebuild.

The second channel is used to add extra files to watch. The caller can use this channel to add extra files to the watcher. The extra files are added to the watcher only if they are not already being watched.

The function returns two channels, but also starts a goroutine that listens for events on the watcher. The goroutine is not stopped until the channel is closed.

The function is not safe for concurrent use. It is the caller's responsibility to ensure that the function is not called concurrently.

Types

This section is empty.

Jump to

Keyboard shortcuts

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