function brainstorm_profile_recurse_copy in Brainstorm profile 8
Same name and namespace in other branches
- 7 brainstorm_profile.profile \brainstorm_profile_recurse_copy()
Recursive copy.
Parameters
string $src:
- Source folder with files.
string $dst:
- Destination folder.
1 call to brainstorm_profile_recurse_copy()
- brainstorm_profile_install_tasks_alter in ./
brainstorm_profile.profile - Implements hook_profile_install_tasks_alter().
File
- ./
brainstorm_profile.profile, line 76 - Enables modules and site configuration for a standard site installation.
Code
function brainstorm_profile_recurse_copy($src, $dst) {
if (is_dir($src)) {
$dir = opendir($src);
@mkdir($dst);
while (FALSE !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..') {
if (is_dir($src . '/' . $file)) {
brainstorm_profile_recurse_copy($src . '/' . $file, $dst . '/' . $file);
}
else {
copy($src . '/' . $file, $dst . '/' . $file);
}
}
}
closedir($dir);
}
}