protected function removeDirectory($path)
    {
        foreach (scandir($path) as $item) {
            if (!in_array($item, array('.','..'))) {
                @unlink($path.DIRECTORY_SEPARATOR.$item);
                $this->dispatcher->dispatch(TranscodeEvents::DIR_REMOVED, new FileEvent($outputPath));
            }
        }

        if (!rmdir($path)) {
            throw new Exception\FilePermissionException(sprintf("Could not remove directory %s", $path));
        }
    }
protected function removeDirectory($path)
    {
        foreach (scandir($path) as $item) {
            if (!in_array($item, array('.','..'))) {
                @unlink($path.DIRECTORY_SEPARATOR.$item);
                $this->dispatcher->dispatch(TranscodeEvents::DIR_REMOVED, new FileEvent($outputPath));
            }
        }

        if (!rmdir($path)) {
            throw new Exception\FilePermissionException(sprintf("Could not remove directory %s", $path));
        }
    }
protected function removeDirectory ( $ path ) { foreach ( scandir ( $ path ) as $ item ) { if ( ! in_array ( $ item , array ( '.' , '..' ) ) ) { @ unlink ( $ path . DIRECTORY_SEPARATOR . $ item ) ; $ this -> dispatcher -> dispatch ( TranscodeEvents :: DIR_REMOVED , new FileEvent ( $ outputPath ) ) ; } } if ( ! rmdir ( $ path ) ) { throw new Exception \ FilePermissionException ( sprintf ( "Could not remove directory %s" , $ path ) ) ; } }
Remove a directory and all of its contents

@param  string $path
@return void
Remove a directory and all of its contents