Classes/Scheduler/Task/AbstractSitemapTask.php
protected function cleanupDirectory()
    {
        if (empty($this->sitemapDir)) {
            throw new \Exception('Basedir not set');
        }

        $fullPath = PATH_site . '/' . $this->sitemapDir;

        if (!is_dir($fullPath)) {
            Typo3GeneralUtility::mkdir($fullPath);
        }

        foreach (new \DirectoryIterator($fullPath) as $file) {
            if ($file->isFile() && !$file->isDot()) {
                $fileName = $file->getFilename();
                unlink($fullPath . '/' . $fileName);
            }
        }
    }
protected function cleanupDirectory()
    {
        if (empty($this->sitemapDir)) {
            throw new \Exception('Basedir not set');
        }

        $fullPath = PATH_site . '/' . $this->sitemapDir;

        if (!is_dir($fullPath)) {
            Typo3GeneralUtility::mkdir($fullPath);
        }

        foreach (new \DirectoryIterator($fullPath) as $file) {
            if ($file->isFile() && !$file->isDot()) {
                $fileName = $file->getFilename();
                unlink($fullPath . '/' . $fileName);
            }
        }
    }
protected function cleanupDirectory ( ) { if ( empty ( $ this -> sitemapDir ) ) { throw new \ Exception ( 'Basedir not set' ) ; } $ fullPath = PATH_site . '/' . $ this -> sitemapDir ; if ( ! is_dir ( $ fullPath ) ) { Typo3GeneralUtility :: mkdir ( $ fullPath ) ; } foreach ( new \ DirectoryIterator ( $ fullPath ) as $ file ) { if ( $ file -> isFile ( ) && ! $ file -> isDot ( ) ) { $ fileName = $ file -> getFilename ( ) ; unlink ( $ fullPath . '/' . $ fileName ) ; } } }
Cleanup sitemap directory
Cleanup sitemap directory