public function run()
    {
        $maxATime = time() - self::TTL;

        $files = Finder::create()
            ->in($this->storePath)
            ->depth(1)
            ->name(Runner::BOOTSTRAP_FILENAME)
            ->filter(function (SplFileInfo $d) use ($maxATime) {
                return $d->getATime() < $maxATime;
            })
        ;

        $directories = array();

        foreach ($files as $file) {
            $directories[] = dirname($file);
        }

        $this->filesystem->remove($directories);
    }
public function run()
    {
        $maxATime = time() - self::TTL;

        $files = Finder::create()
            ->in($this->storePath)
            ->depth(1)
            ->name(Runner::BOOTSTRAP_FILENAME)
            ->filter(function (SplFileInfo $d) use ($maxATime) {
                return $d->getATime() < $maxATime;
            })
        ;

        $directories = array();

        foreach ($files as $file) {
            $directories[] = dirname($file);
        }

        $this->filesystem->remove($directories);
    }
public function run ( ) { $ maxATime = time ( ) - self :: TTL ; $ files = Finder :: create ( ) -> in ( $ this -> storePath ) -> depth ( 1 ) -> name ( Runner :: BOOTSTRAP_FILENAME ) -> filter ( function ( SplFileInfo $ d ) use ( $ maxATime ) { return $ d -> getATime ( ) < $ maxATime ; } ) ; $ directories = array ( ) ; foreach ( $ files as $ file ) { $ directories [ ] = dirname ( $ file ) ; } $ this -> filesystem -> remove ( $ directories ) ; }
Remove old workingDirectories.
Remove old workingDirectories .