Source of file ResetWebRootDir.php
Size: 1,002 Bytes - Last Modified: 2020-07-03T12:08:09+00:00
/var/www/docs.ssmods.com/process/src/src/Tasks/IndividualTasks/ResetWebRootDir.php
123456789101112131415161718192021222324252627282930313233343536373839 | <?php namespace Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks; use Sunnysideup\UpgradeToSilverstripe4\Api\FileSystemFixes; use Sunnysideup\UpgradeToSilverstripe4\Tasks\Task; /** * Delete the web root directory to allow for a fresh install. */ class ResetWebRootDir extends Task { protected $taskStep = 's00'; public function getTitle() { return 'Remove and reset the web root'; } public function getDescription() { return ' Delete the web root directory to allow for a fresh install.'; } public function runActualTask($params = []) { FileSystemFixes::inst($this->mu()) ->removeDirOrFile($this->mu()->getWebRootDirLocation(), $this->mu()->getAboveWebRootDirLocation()); FileSystemFixes::inst($this->mu()) ->mkDir($this->mu()->getWebRootDirLocation(), $this->mu()->getAboveWebRootDirLocation()); } protected function hasCommitAndPush() { return false; } } |