public function clearOutputDirectory()
    {
        $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->outputDir, \FilesystemIterator::SKIP_DOTS));
        foreach ($files as $file) {
            $path = (string)$file;
            $basename = basename($path);
            if ($basename != '..' && $basename != ".gitignore") {
                if (is_file($path) && file_exists($path))
                    unlink($path);
                elseif (is_dir($path) && file_exists($path))
                    rmdir($path);
            }
        }

        return $this;
    }
public function clearOutputDirectory()
    {
        $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->outputDir, \FilesystemIterator::SKIP_DOTS));
        foreach ($files as $file) {
            $path = (string)$file;
            $basename = basename($path);
            if ($basename != '..' && $basename != ".gitignore") {
                if (is_file($path) && file_exists($path))
                    unlink($path);
                elseif (is_dir($path) && file_exists($path))
                    rmdir($path);
            }
        }

        return $this;
    }
public function clearOutputDirectory ( ) { $ files = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ this -> outputDir , \ FilesystemIterator :: SKIP_DOTS ) ) ; foreach ( $ files as $ file ) { $ path = ( string ) $ file ; $ basename = basename ( $ path ) ; if ( $ basename != '..' && $ basename != ".gitignore" ) { if ( is_file ( $ path ) && file_exists ( $ path ) ) unlink ( $ path ) ; elseif ( is_dir ( $ path ) && file_exists ( $ path ) ) rmdir ( $ path ) ; } } return $ this ; }
clear the whole files that has been generated by pdftohtml. Make sure directory ONLY contain generated files from pdftohtml
because it remove the whole contents under preserved output directory
@return $this current object
clear the whole files that has been generated by pdftohtml . Make sure directory ONLY contain generated files from pdftohtml because it remove the whole contents under preserved output directory