Commit d47c6c78 authored by Jens Jacobsen's avatar Jens Jacobsen
Browse files

Fix usage of RecursiveIteratorIterator and DirectoryIterator class

parent 4573786b
Pipeline #952 passed with stages
in 2 minutes and 35 seconds
......@@ -235,9 +235,9 @@ class File
$result = array();
if ($recursive) {
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));
$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory));
} else {
$files = new DirectoryIterator($directory);
$files = new \DirectoryIterator($directory);
}
foreach ($files as $file) {
......@@ -338,7 +338,7 @@ class File
}
// Fetch directory content
$elements = new DirectoryIterator($fromDirectory);
$elements = new \DirectoryIterator($fromDirectory);
foreach ($elements as $element) {
if ($element->isFile() || ($element->isDir() && !$element->isDot())) {
$method = ($element->isFile() ? 'copyFile' : 'copyDirectory');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment