function _normalizeSeparators($path, $separator) { $clean_path = preg_replace( "#$separator$separator+#", $separator, $path); if(Fs :: _hasWin32NetPrefix($path)) $clean_path = '\\' . $clean_path; return $clean_path; }