Neos\Flow\Core\Booting\Scripts::monitorDirectoryIfItExists PHP Method

monitorDirectoryIfItExists() protected static method

Let the given file monitor track changes of the specified directory if it exists.
protected static monitorDirectoryIfItExists ( FileMonitor $fileMonitor, string $path, string $filenamePattern = null ) : void
$fileMonitor Neos\Flow\Monitor\FileMonitor
$path string
$filenamePattern string Optional pattern for filenames to consider for file monitoring (regular expression). @see FileMonitor::monitorDirectory()
return void
    protected static function monitorDirectoryIfItExists(FileMonitor $fileMonitor, $path, $filenamePattern = null)
    {
        if (is_dir($path)) {
            $fileMonitor->monitorDirectory($path, $filenamePattern);
        }
    }