function brainstorm_profile_recurse_copy in Brainstorm profile 7
Same name and namespace in other branches
- 8 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()
File
- ./
brainstorm_profile.profile, line 124 - Enables modules and site configuration for a standard site installation.
Code
function brainstorm_profile_recurse_copy($src, $dst) {
$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);
}