private function scanDir($path)
    {
        if(!is_dir($path)) return;

        /* @var \Symfony\Component\Finder\SplFileInfo $spl */
        $finder = $this->createFinder();

        $rootSPL = new DirectoryResource($path);
        $rootResource = new DirectoryResource($rootSPL);
        $rootResource = $this->createTrackedObject($rootResource);

        $this->add($rootResource);

        foreach($finder->in($path) as $spl)
        {
            if($spl->isFile()){
                $resource = new FileResource($spl);
            }else{
                $resource = new DirectoryResource($spl);
            }
            $trackedResource = $this->createTrackedObject($resource);
            $this->add($trackedResource);
        }
    }
private function scanDir($path)
    {
        if(!is_dir($path)) return;

        /* @var \Symfony\Component\Finder\SplFileInfo $spl */
        $finder = $this->createFinder();

        $rootSPL = new DirectoryResource($path);
        $rootResource = new DirectoryResource($rootSPL);
        $rootResource = $this->createTrackedObject($rootResource);

        $this->add($rootResource);

        foreach($finder->in($path) as $spl)
        {
            if($spl->isFile()){
                $resource = new FileResource($spl);
            }else{
                $resource = new DirectoryResource($spl);
            }
            $trackedResource = $this->createTrackedObject($resource);
            $this->add($trackedResource);
        }
    }
private function scanDir ( $ path ) { if ( ! is_dir ( $ path ) ) return ; /* @var \Symfony\Component\Finder\SplFileInfo $spl */ $ finder = $ this -> createFinder ( ) ; $ rootSPL = new DirectoryResource ( $ path ) ; $ rootResource = new DirectoryResource ( $ rootSPL ) ; $ rootResource = $ this -> createTrackedObject ( $ rootResource ) ; $ this -> add ( $ rootResource ) ; foreach ( $ finder -> in ( $ path ) as $ spl ) { if ( $ spl -> isFile ( ) ) { $ resource = new FileResource ( $ spl ) ; } else { $ resource = new DirectoryResource ( $ spl ) ; } $ trackedResource = $ this -> createTrackedObject ( $ resource ) ; $ this -> add ( $ trackedResource ) ; } }
Scan path and add it to listener
@param string $path
Scan path and add it to listener