class WatchPath

Methods

__construct(string $path, WatchPathType $type, string|null $pattern = null)

No description

bool
matches(string $relativePath)

Determine if a relative file path matches this watch path.

Details

at line 18
__construct(string $path, WatchPathType $type, string|null $pattern = null)

No description

Parameters

string $path

Relative base path (e.g., 'app', 'config', '.env')

WatchPathType $type

Whether this entry represents a directory or a file

string|null $pattern

Original glob pattern for filtering

at line 35
bool matches(string $relativePath)

Determine if a relative file path matches this watch path.

For File entries: exact match against the path. For Directory entries without a pattern: matches any file under the directory. For Directory entries with a pattern: matches using Symfony Glob regex.

Parameters

string $relativePath

Return Value

bool