Example #1
0
 public function restore($checkpointId)
 {
     $checkpointDir = $this->locator->getCheckpointDir() . '/' . $checkpointId;
     if (!$this->fsHelper->fileExists($checkpointDir)) {
         $message = sprintf('Checkpoint %s does not exist.', $checkpointId);
         throw new \UnexpectedValueException($message);
     }
     $ocRoot = $this->locator->getOwncloudRootPath();
     $this->fsHelper->copyr($checkpointDir . '/' . self::CORE_DIR, $ocRoot, false);
     $this->fsHelper->copyr($checkpointDir . '/' . self::APP_DIR, $ocRoot . '/' . self::APP_DIR, false);
 }