List of utility methods to do Path Create
String | toPath(String groupId) to Path final StringBuilder sb = new StringBuilder(groupId); int length = sb.length(); for (int i = 0; i < length; i++) { if (sb.charAt(i) == '.') { sb.setCharAt(i, '/'); return sb.toString(); ... |
String | toPath(String id) to Path int length = id.length(); StringBuilder sb = new StringBuilder(length + 8); int start = 0; while (start < length) { int next = start + 4; int end = next; if (end > length) { end = length; ... |
String[] | toPath(String pathName) Translates the given identifier path name into a corresponding sequence of identifiers. return pathName == null ? null : pathName.split("\\.", -1); |
String | toPath(String srcPath, boolean nodeModelSource) to Path if (nodeModelSource) { StringBuilder builder = new StringBuilder(); if (srcPath.startsWith("/") && srcPath.length() > 0) { srcPath = srcPath.substring(1); String[] tokens = srcPath.split("/"); builder.append(".vars[\"").append(tokens[0]).append("\"]"); if (tokens.length > 1) { ... |
String | toPath(String... paths) to Path StringBuilder builder = new StringBuilder(); for (String path : paths) { if (path.endsWith("/")) { path = path.substring(0, path.length() - 1); if (path.startsWith("/")) { builder.append(path); } else { ... |
String | toPath(String[] array) to Path if (array.length > 0) { StringBuilder sb = new StringBuilder(array[0]); for (int i = 1; i < array.length; i++) { sb.append(CPS).append(array[i]); return sb.toString(); } else return null; ... |
int | toPathIndex(String fileName) to Path Index int point = fileName.indexOf('/'); if (point == -1) { point = fileName.indexOf('\\'); return point; |
String | toPathName(String name) Converts a string into a valid path name String result = ""; for (char c : name.toCharArray()) { if (!allowedChars.contains("" + c)) { result += "_" + ((int) c) + "_"; } else { result += c; return result; |
String | toPathPart(String fileName) to Path Part int point = toPathLsatIndex(fileName); int length = fileName.length(); if (point == -1) { return ""; } else if (point == length - 1) { int secondPoint = toPathLsatIndex(fileName, point - 1); if (secondPoint == -1) { return ""; ... |
String | toPathsFromArray(final String[] items) to Paths From Array if (items == null) { return ""; final StringBuilder dirStr = new StringBuilder(1024); for (final String dir : items) { dirStr.append(dir).append(";"); return dirStr.toString(); ... |