Exemple #1
0
 /**
  * Create a symlink to the given target for the non-root user.
  *
  * This uses the command line as PHP can't change symlink permissions.
  *
  * @param string $target
  * @param string $link
  *
  * @return void
  */
 public function symlinkAsUser($target, $link)
 {
     if ($this->exists($link)) {
         $this->unlink($link);
     }
     CommandLineFacade::runAsUser('ln -s ' . escapeshellarg($target) . ' ' . escapeshellarg($link));
 }
Exemple #2
0
 /**
  * Create a symlink to the given target for the non-root user.
  *
  * This uses the command line as PHP can't change symlink permissions.
  *
  * @param  string  $target
  * @param  string  $link
  * @return void
  */
 function symlinkAsUser($target, $link)
 {
     if ($this->exists($link)) {
         $this->unlink($link);
     }
     //        CommandLineFacade::runAsUser('ln -s '.$target.' '.$link);
     //        echo 'mklink /D "'.$link.'" "'.$target.'"';
     CommandLineFacade::runAsUser('mklink /D "' . $link . '" "' . $target . '"');
 }