Yaffs site version 1.1
[yaffs-website] / vendor / drupal-composer / drupal-scaffold / src / InitialFileFetcher.php
1 <?php
2
3 /**
4  * @file
5  * Contains \DrupalComposer\DrupalScaffold\FileFetcher.
6  */
7
8 namespace DrupalComposer\DrupalScaffold;
9
10 class InitialFileFetcher extends FileFetcher {
11
12   public function fetch($version, $destination) {
13     array_walk($this->filenames, function ($filename, $sourceFilename) use ($version, $destination) {
14       $target = "$destination/$filename";
15       if (!file_exists($target)) {
16         $url = $this->getUri($sourceFilename, $version);
17         $this->fs->ensureDirectoryExists($destination . '/' . dirname($filename));
18         $this->remoteFilesystem->copy($url, $url, $target);
19       }
20     });
21   }
22
23 }