function copyConfigFiles($configurationFileName, $projectConfigRoot) { $commonConfigLocation = FILES_TO_COPY_PHP_TEMPLATE_FRAMEWORK . FILE_SEPARATOR . "config"; fileSystemUtils::xcopy($commonConfigLocation, $projectConfigRoot); //$replacementPairs = ""; //$replacementPairs[] = new pair("{APPLICATION_NAME}",$appName); //fileSystemUtils::xReplaceStringInFiles($rootDirectory,$replacementPairs); }
/** * @return recursively copy directories from one place to the other * @param source : full source directory to copy from * @param dest : full destination directory to copy from * @ **/ function xcopy($source, $dest) { if (!is_dir($source)) { return 0; } if (!is_dir($dest)) { mkdir($dest, "0755"); } $h = @dir($source); while (@($entry = $h->read()) !== false) { if ($entry != "." && $entry != ".." && $entry != "cvs" && $entry != "CVS") { if (is_dir("{$source}/{$entry}") && $dest !== $source . FILE_SEPARATOR . $entry) { fileSystemUtils::xcopy($source . FILE_SEPARATOR . $entry, $dest . FILE_SEPARATOR . $entry); } else { @copy($source . FILE_SEPARATOR . $entry, $dest . FILE_SEPARATOR . $entry); } } } $h->close(); return 1; }