List of utility methods to do Path Normalize
String | normalizeMediaPath(String hrefBaseUrl, String localMediaPath, String href) Normalizes a HREF so it points to the local media Eclipse project String result = ""; try { result = localMediaPath + href.split(hrefBaseUrl)[1]; } catch (Exception e) { result = localMediaPath + href; return result; |
String | normalizeName(final String path, final boolean isDirectory) normalize Name String normalizedPath = path.replace(WIN_PATH_SEPARATOR, ARCHIVE_PATH_SEPARATOR); if (isDirectory && !normalizedPath.endsWith(ARCHIVE_PATH_SEPARATOR)) { normalizedPath += ARCHIVE_PATH_SEPARATOR; return normalizedPath; |
String | NormalizeName(String absolutePath) Normalize Name String name = absolutePath; for (String symbol : forbiddenSymbols) { if (!symbol.equals("\\")) name = name.replace(symbol, ""); return name; |
String | normalizePath(final String in) normalize Path String out = in; if (in.endsWith("/")) { out = in.substring(0, in.length() - 1); return out.replace("\\", "/"); |
String | normalizePath(final String path) Converts path characters from their native format to the "forward-slash" format expected within RPM files. return path.replace('\\', '/'); |
String | normalizePath(final String path) Normalize path. return path.replace("%7E", "~").replace(" ", "%20"); |
String | normalizePath(final String path) Removes any extra path separators and converts all from back slashes to forward slashes. return path != null ? path.replaceAll(BACK_SLASH_NORMALIZATION_PATTERN, FORWARD_SLASH)
.replaceAll(FORWARD_SLASH_NORMALIZATION_PATTERN, FORWARD_SLASH) : null;
|
String | normalizePath(final String path) normalize Path if (path.endsWith("/") || path.endsWith("\\")) { return normalizePath(path.substring(0, path.length() - 1)); } else { return path.replaceAll("/+", "/").replaceAll("\\\\+", "\\\\"); |
String | normalizePath(final String... path) normalize Path if (path == null || path.length < 1) { return "/"; final StringBuilder sb = new StringBuilder(); int idx = 0; parts: for (String part : path) { if (part == null || part.length() < 1 || "/".equals(part)) { continue parts; ... |
String | normalizePath(String _path, boolean _appendFinalSeparator) Normalize a file system path expression for the current OS. if (_path == null) { return _path; String path = _path.replace("\\", FILE_SEPARATOR).replace("/", FILE_SEPARATOR); if (_appendFinalSeparator && !path.endsWith(FILE_SEPARATOR)) { path += FILE_SEPARATOR; return path; ... |