file_handler

package
v0.0.0-...-13c586f Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsTempPatterns

func ContainsTempPatterns(filename string) bool

func ShouldIgnoreEvent

func ShouldIgnoreEvent(eventName string, ignoreList []string) bool

func ShouldTriggerRestart

func ShouldTriggerRestart(eventOp fsnotify.Op) bool

Types

type WatchFiles

type WatchFiles struct {
	Path    string
	Reflect string
	Ignore  []string
}

func (*WatchFiles) EnoughTimeSinceLastRestart

func (w *WatchFiles) EnoughTimeSinceLastRestart(lastRestartTime time.Time) bool

EnoughTimeSinceLastRestart checks if enough time has passed since the last restart.

func (*WatchFiles) FileChanges

func (w *WatchFiles) FileChanges(restartChan <-chan bool)

FileChanges monitors file changes and restarts the application when necessary.

func (*WatchFiles) RestartApp

func (w *WatchFiles) RestartApp()

RestartApp restarts the application.

func (*WatchFiles) Run

func (w *WatchFiles) Run()

Run starts monitoring file changes.

Jump to

Keyboard shortcuts

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