copyFile() public static method

Copy a file to its final destination in the skeleton.
public static copyFile ( Composer\IO\IOInterface $io, string $projectRoot, string $source, string $target, boolean $force = false )
$io Composer\IO\IOInterface
$projectRoot string
$source string Source file.
$target string Destination.
$force boolean whether or not to copy over an existing file.
 public function installPackage($config, $copyFilesKey)
 {
     /* TODO: First we need to set $composerDefinition, $composerRequires, $composerDevRequires and $stabilityFlags;
        // Add packages to install
        if (isset($config['packages'])) {
            foreach ($config['packages'] as $packageName) {
                OptionalPackages::addPackage($this->io, $packageName, $this->config['packages'][$packageName]);
            }
        }*/
     // Copy files
     if (isset($config[$copyFilesKey])) {
         foreach ($config[$copyFilesKey] as $source => $target) {
             OptionalPackages::copyFile($this->io->reveal(), $this->projectRoot, $source, $target);
         }
     }
 }