Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Watch ¶
Watch monitors the given directories for new and deleted project subdirectories. onNew is called when an artisan file appears in a direct subdirectory of a parked dir. onRemoved is called when a watched subdirectory is deleted.
func WatchWorktrees ¶ added in v0.6.0
func WatchWorktrees( getSites func() []string, onAdded func(sitePath, name string), onRemoved func(sitePath, name string), ) error
WatchWorktrees monitors the .git/worktrees/ directory for each site returned by getSites and calls onAdded/onRemoved when entries appear or disappear. It also watches .git/ itself so it can re-attach to .git/worktrees/ if it is deleted (last worktree removed) and then re-created (first new worktree added). It re-polls getSites every 30 seconds to pick up newly registered sites.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.