Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Wn\Generators\Commands; |
||
41 | private function copyFile($from, $to){ |
||
42 | if ($this->fs->exists($to) && !$this->option('f')) { |
||
43 | return false; |
||
44 | } |
||
45 | |||
46 | $dir = dirname($to); |
||
47 | |||
48 | if (!$this->fs->isDirectory($dir)) { |
||
49 | $this->fs->makeDirectory($dir, 0755, true); |
||
50 | } |
||
51 | |||
52 | return $this->fs->copy($from, $to); |
||
53 | } |
||
54 | } |
||
55 |