Class Watch This class is used to define the watch command for the application. It watches the building folders for changes and rebuilds the application whenever changes are detected.
run(Darken\Console\Application $app) |
---|
runWatch(array $folders, Darken\Console\Application $app) |
hashDirectory(string $directory) |
$app | Darken\Console\Application |
Return | void |
Watches the folders and rebuilds whenever changes are detected.
$folders | array |
$app | Darken\Console\Application |
Return | void |
Creates a hash representing the current state of a directory. This function recursively scans the directory, collecting file paths and modification times. It then returns a hash that changes whenever a file is added, removed, or modified.
$directory | string |
Return | string |