public function UpdateConfigurationForm::recurseCopy in Config Direct Save 8
Same name and namespace in other branches
- 8.2 src/Form/UpdateConfigurationForm.php \Drupal\config_direct_save\Form\UpdateConfigurationForm::recurseCopy()
Copy the directory of.
1 call to UpdateConfigurationForm::recurseCopy()
- UpdateConfigurationForm::createConfigFiles in src/
Form/ UpdateConfigurationForm.php - Override the old configurations.
File
- src/
Form/ UpdateConfigurationForm.php, line 157
Class
- UpdateConfigurationForm
- Provide the settings form for updating configurations.
Namespace
Drupal\config_direct_save\FormCode
public function recurseCopy($src, $dst) {
$dir = opendir($src);
@mkdir($dst);
while (FALSE !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..') {
if (is_dir($src . '/' . $file)) {
$this
->recurseCopy($src . '/' . $file, $dst . '/' . $file);
}
else {
copy($src . '/' . $file, $dst . '/' . $file);
}
}
}
closedir($dir);
}