initApplication(); } } function copy_path($source, $destination) { if (is_dir($source)) { if (!is_dir($destination)) { mkdir($destination); } $path = dir($source); while (($file = $path->read()) != false) { if ($file == '.' || $file == '..') { continue; } $pathDir = $source . '/' . $file; copy($pathDir, $destination . '/' . $file); } $path->close(); } } function remove_path($path, $only_content = false) { if(is_dir($path)) { $dir = dir($path); while (($file = $dir->read()) != false) { if ($file == '.' || $file == '..') { continue; } $pathDir = $path . '/' . $file; unlink($pathDir); } if ($only_content === false) { rmdir(dirname($pathDir)); } } } ?>