List of utility methods to do Path Normalize
String | normalizeZKPath(String basePath, String child) normalize ZK Path while (basePath.endsWith("/")) { basePath = basePath.substring(0, basePath.length() - 2); while (child.startsWith("/")) { child = child.substring(1); return basePath + "/" + child; |
String | normPathSeparator(String string) Puts a path separator at end of a string if missing. if (string == null) { return ""; if (!string.endsWith(System.getProperty("file.separator"))) { return string + System.getProperty("file.separator"); return string; |