List of utility methods to do Path Normalize
String | normalize(String pathname, int len, int off) normalize if (len == 0) return pathname; int n = len; while ((n > 0) && (pathname.charAt(n - 1) == '/')) n--; if (n == 0) return "/"; StringBuilder sb = new StringBuilder(pathname.length()); ... |
int | normalize_color_path(int eff_color_path) Rasterizer inlines eff_color_path &= ~((1 << 26) | (1 << 27));
return eff_color_path;
|
String | normalizeAllSeparators(String path) Replaces forward and backward slashes, not only system-specific separators, with a forward slash. return path.replaceAll("[/\\\\]+", "/"); |
String | normalizeBasePath(String basePath) normalize Base Path String normalized = basePath; while (normalized.endsWith("/")) { normalized = normalized.substring(0, normalized.length() - 1); return normalized; |
String | normalizeDbPath(String databasePath) normalize Db Path databasePath = databasePath.replace('\\', '/').toLowerCase(); if (!databasePath.startsWith("/")) { databasePath = "/".concat(databasePath); return databasePath; |
String | normalizeDotSegment(String path) normalize Dot Segment while (path.startsWith("/./") || path.startsWith("/../")) { path = path.replaceFirst("/[\\.]+/", "/"); return path; |
String | normalizedPath(String original) Replaces all backslashes with slash char. return original.replaceAll("\\\\", "/"); |
String | normalizeFileSystemPath(String path) Convert Windows path to Unix if (path != null) { String osname = System.getProperty("os.name"); if (osname.toLowerCase().contains("windows")) { return path.replace('\\', '/'); return path; |
String | normalizeFullPath(String path) Normalizes full path names by resolving . if (path != null) { int index; StringBuilder buffer; char ch; path = path.replace('\\', '/'); do { index = path.indexOf("/./"); if (index != -1) { ... |
String | normalizeLocalPath(final String localPath) Remove any trailing "\" from the end of a windows style local path. if (localPath.endsWith("\\") && localPath.length() > 3) return localPath.substring(0, localPath.length() - 1); return localPath; |