Darken\Console\Commands\Watch

class

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.

Methods

Method Details

public void run (Darken\Console\Application $app) Watch.php#19
$app Darken\Console\Application
Return void
protected void runWatch (array $folders, Darken\Console\Application $app) Watch.php#28

Watches the folders and rebuilds whenever changes are detected.

$folders array
$app Darken\Console\Application
Return void
protected string hashDirectory (string $directory) Watch.php#63

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