Service/Dumper.php
protected function activate($targetDir)
    {
        if (!is_dir($targetDir)) {
            mkdir($targetDir, 0777, true);
        }

        if (!is_writable($targetDir)) {
            $this->cleanup();
            throw new \RuntimeException(
                sprintf('Can\'t move sitemaps to "%s" - directory is not writeable', $targetDir)
            );
        }
        $this->deleteExistingSitemaps($targetDir);

        // no need to delete the root file as it always exists, it will be overwritten
        $this->filesystem->mirror($this->tmpFolder, $targetDir, null, array('override' => true));
        $this->cleanup();
    }
protected function activate($targetDir)
    {
        if (!is_dir($targetDir)) {
            mkdir($targetDir, 0777, true);
        }

        if (!is_writable($targetDir)) {
            $this->cleanup();
            throw new \RuntimeException(
                sprintf('Can\'t move sitemaps to "%s" - directory is not writeable', $targetDir)
            );
        }
        $this->deleteExistingSitemaps($targetDir);

        // no need to delete the root file as it always exists, it will be overwritten
        $this->filesystem->mirror($this->tmpFolder, $targetDir, null, array('override' => true));
        $this->cleanup();
    }
protected function activate ( $ targetDir ) { if ( ! is_dir ( $ targetDir ) ) { mkdir ( $ targetDir , 0777 , true ) ; } if ( ! is_writable ( $ targetDir ) ) { $ this -> cleanup ( ) ; throw new \ RuntimeException ( sprintf ( 'Can\'t move sitemaps to "%s" - directory is not writeable' , $ targetDir ) ) ; } $ this -> deleteExistingSitemaps ( $ targetDir ) ; // no need to delete the root file as it always exists, it will be overwritten $ this -> filesystem -> mirror ( $ this -> tmpFolder , $ targetDir , null , array ( 'override' => true ) ) ; $ this -> cleanup ( ) ; }
Moves sitemaps created in a temporary folder to their real location

@param string $targetDir Directory to move created sitemaps to

@throws \RuntimeException
Moves sitemaps created in a temporary folder to their real location