/**
  * Symlinks the shared locations
  *
  * @param Context $context
  */
 protected function symlinkSharedFilesAndFolders(Context $context)
 {
     $basepath = $this->transporter->getPath();
     $sharedPath = $basepath . '/shared';
     $uploadPath = $basepath . '/' . $this->getUploadPath($context->getVersion());
     $shared = (array) $this->options['shared'];
     // add some white space to the output
     if (count($shared) > 0) {
         $this->io->write('');
     }
     foreach ($shared as $fileOrFolder) {
         $sharedFilepath = $sharedPath . '/' . $fileOrFolder;
         $uploadFilepath = $uploadPath . '/' . $fileOrFolder;
         // make sure the symlink destination doesn't exist
         if (true === $this->transporter->exists($uploadFilepath)) {
             // Ok, it exists, but it's a symlink... let's assume that it was created
             // in an earlier deploy with conveyor
             if (true === $this->transporter->isSymlink($uploadFilepath)) {
                 continue;
             }
             $answer = $this->io->askConfirmation(sprintf('<error>Warning</error> Shared file/folder <info>%s</info> already exists, do you want to overwrite it? (n/Y): ', $uploadFilepath), false);
             if ($answer) {
                 $this->transporter->remove($uploadFilepath, true);
             } else {
                 continue;
             }
         }
         $this->transporter->symlink($sharedFilepath, $uploadFilepath);
     }
 }
 /**
  * Checks for symlink on the remote server
  *
  * @param $dest
  * @return bool
  */
 public function isSymlink($dest)
 {
     return $this->innerTransporter->isSymlink($dest);
 }