5 * Contains \DrupalComposer\DrupalScaffold\FileFetcher.
8 namespace DrupalComposer\DrupalScaffold;
10 use Composer\Util\Filesystem;
11 use Composer\Util\RemoteFilesystem;
13 class InitialFileFetcher extends FileFetcher {
14 public function fetch($version, $destination) {
15 array_walk($this->filenames, function ($filename, $sourceFilename) use ($version, $destination) {
16 $target = "$destination/$filename";
17 if (!file_exists($target)) {
18 $url = $this->getUri($sourceFilename, $version);
19 $this->fs->ensureDirectoryExists($destination . '/' . dirname($filename));
20 $this->remoteFilesystem->copy($url, $url, $target);