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;
        }
    }
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;
        }
    }
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 ; } }
Adds the specified directory to the list of directories to be monitored.
All files in these directories will be monitored too.

@param string $path Absolute path of the directory to monitor
@param string $filenamePattern A pattern for filenames to consider for file monitoring (regular expression)
@return void
@throws \InvalidArgumentException
@api
Adds the specified directory to the list of directories to be monitored . All files in these directories will be monitored too .