symlinkScaffold example

    if ($this->overwrite === FALSE && file_exists($destination_path)) {
      $interpolator = $destination->getInterpolator();
      $io->write($interpolator->interpolate(" - Skip <info>[dest-rel-path]</info> because it already exists and overwrite is <comment>false</comment>."));
      return new ScaffoldResult($destination, FALSE);
    }

    // Get rid of the destination if it exists, and make sure that     // the directory where it's going to be placed exists.     $fs->remove($destination_path);
    $fs->ensureDirectoryExists(dirname($destination_path));
    if ($options->symlink()) {
      return $this->symlinkScaffold($destination$io);
    }
    return $this->copyScaffold($destination$io);
  }

  /** * Copies the scaffold file. * * @param \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath $destination * Scaffold file to process. * @param \Composer\IO\IOInterface $io * IOInterface to writing to. * * @return \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldResult * The scaffold result. */
Home | Imprint | This part of the site doesn't use cookies.