src/Rocketeer/Services/Connections/Shell/Modules/Filesystem.php
public function symlink($folder, $symlink)
    {
        if (!$this->fileExists($folder)) {
            if (!$this->fileExists($symlink)) {
                return false;
            }

            $this->move($symlink, $folder);
        }

        // Switch to relative if required
        if ($this->config->getContextually('remote.symlink') === 'relative') {
            $folder = $this->paths->computeRelativePathBetween($symlink, $folder);
        }

        switch ($this->environment->getOperatingSystem()) {
            case 'Linux':
                return $this->symlinkSwap($folder, $symlink);
            default:
                if ($this->fileExists($symlink)) {
                    $this->removeFolder($symlink);
                }

                return $this->modulable->run([
                    sprintf('ln -s %s %s', $folder, $symlink),
                ]);
        }
    }
public function symlink($folder, $symlink)
    {
        if (!$this->fileExists($folder)) {
            if (!$this->fileExists($symlink)) {
                return false;
            }

            $this->move($symlink, $folder);
        }

        // Switch to relative if required
        if ($this->config->getContextually('remote.symlink') === 'relative') {
            $folder = $this->paths->computeRelativePathBetween($symlink, $folder);
        }

        switch ($this->environment->getOperatingSystem()) {
            case 'Linux':
                return $this->symlinkSwap($folder, $symlink);
            default:
                if ($this->fileExists($symlink)) {
                    $this->removeFolder($symlink);
                }

                return $this->modulable->run([
                    sprintf('ln -s %s %s', $folder, $symlink),
                ]);
        }
    }
public function symlink ( $ folder , $ symlink ) { if ( ! $ this -> fileExists ( $ folder ) ) { if ( ! $ this -> fileExists ( $ symlink ) ) { return false ; } $ this -> move ( $ symlink , $ folder ) ; } // Switch to relative if required if ( $ this -> config -> getContextually ( 'remote.symlink' ) === 'relative' ) { $ folder = $ this -> paths -> computeRelativePathBetween ( $ symlink , $ folder ) ; } switch ( $ this -> environment -> getOperatingSystem ( ) ) { case 'Linux' : return $ this -> symlinkSwap ( $ folder , $ symlink ) ; default : if ( $ this -> fileExists ( $ symlink ) ) { $ this -> removeFolder ( $ symlink ) ; } return $ this -> modulable -> run ( [ sprintf ( 'ln -s %s %s' , $ folder , $ symlink ) , ] ) ; } }
Symlinks two folders.

@param string $folder  The folder in shared/
@param string $symlink The folder that will symlink to it

@return string
Symlinks two folders .