@@ 98-112 (lines=15) @@ | ||
95 | ||
96 | $filesCount = count($dir) - count($this->ignoredFiles); |
|
97 | $progress = $this->output->createProgressBar($filesCount); |
|
98 | foreach ($dir as $file) { |
|
99 | if (in_array($file, $this->ignoredFiles)) { |
|
100 | continue; |
|
101 | } |
|
102 | ||
103 | // Capture the uploaded files for displaying later |
|
104 | $this->uploadedFiles[$what][] = $remotePath . $file; |
|
105 | ||
106 | // Copy the files |
|
107 | Storage::disk($this->getDiskName())->put( |
|
108 | $remotePath . $file, |
|
109 | $localPath . '/' . $file |
|
110 | ); |
|
111 | $progress->advance(); |
|
112 | } |
|
113 | $progress->finish(); |
|
114 | ||
115 | return true; |
@@ 24-37 (lines=14) @@ | ||
21 | ||
22 | $remotePath = Config::get('db-exporter.remote.' . $what); |
|
23 | ||
24 | foreach ($this->files($what) as $file) { |
|
25 | if (in_array($file, $this->ignoredFiles)) { |
|
26 | continue; |
|
27 | } |
|
28 | ||
29 | // Capture the uploaded files for display later |
|
30 | self::$uploadedFiles[$what][] = $remotePath . $file; |
|
31 | ||
32 | // Copy the files |
|
33 | Storage::disk($this->getDiskName())->put( |
|
34 | $remotePath . $file, |
|
35 | $localPath . '/' . $file |
|
36 | ); |
|
37 | } |
|
38 | ||
39 | return true; |
|
40 | } |