List of utility methods to do Path Normalize
String | getCanonicalPath(File pFile) get Canonical Path String lReturnPath = pFile.getAbsolutePath(); lReturnPath = lReturnPath.replaceAll("\\\\", "/"); final String regExp1 = "()[^/]+/(\\.\\.)"; final Pattern pattern1 = Pattern.compile(regExp1); final String regExp2 = "([^/]+/)(\\.)"; final Pattern pattern2 = Pattern.compile(regExp2); final String regExp3 = "(/)(/)"; final Pattern pattern3 = Pattern.compile(regExp3); ... |
File | normalizeFile(String path) normalize File return normalizeFile(new File(path)); |
String | normalizePath(String path) normalize Path return normalizePath(path, isWindows());
|
String | normalizePath(String path, boolean isWindows) normalize Path if (path == null) { return null; path = path.trim(); path = path.replace(BACKSLASH_CHAR, SLASH_CHAR); String prefix = getSystemDependentPrefix(path, isWindows); if (prefix == null) { return null; ... |
String | normalizeUnixPath(String path) normalize Unix Path return normalizePath(path, false);
|
String | normalizeWindowsPath(String path) normalize Windows Path return normalizePath(path, true);
|