$f) { if ($f->isDir()) { rmdir($p); } else if ($f->isFile()) { chmod($p, 0777); unlink($p); } } rmdir($path); } public static function normalizeDirectorySeparator($path) { return str_replace(DIRECTORY_SEPARATOR, '/', $path); } public static function normalizeNewLines($string) { return str_replace("\r\n", "\n", $string); } public static function normalizeEscapeShellArg($command) { return str_replace("'", '"', $command); } }