public function monitorDirectory($path, $filenamePattern = null)
{
if (!is_string($path)) {
throw new \InvalidArgumentException('String expected, ' . gettype($path), ' given.', 1231171810);
}
$path = Files::getNormalizedPath(Files::getUnixStylePath($path));
if (!array_key_exists($path, $this->monitoredDirectories)) {
$this->monitoredDirectories[$path] = $filenamePattern;
}
}