List of utility methods to do File Path Create
String | buildPath(String[] seperatedName) build Path String iconName = "textures/items/"; for (int i = 1; i < seperatedName.length - 1; i++) { iconName += seperatedName[i] + "/"; iconName += seperatedName[seperatedName.length - 1] + ".png"; return iconName; |
String[] | buildPathArray(String xpath) Build the input for the get...FromPath methods. String[] result = null; if (xpath != null && xpath.charAt(0) != '/') { int components = 1; int i, l; l = xpath.length(); boolean found = false; i = 0; while (i < l && found == false) { ... |
String | buildPathString(String[] folders, boolean addDefaultValues) build Path String String del = System.getProperty("path.separator"); StringBuffer path = new StringBuffer(); if (null != folders && folders.length > 0) { for (String folder : folders) { path.append(folder).append(del); if (addDefaultValues) { ... |
String | buildPathToApiTargetFolder(String apiPackageName, String path) build Path To Api Target Folder return path + convertPackageNameToFolderPath(apiPackageName);
|
String | filePath(String compchartimage) file Path return appHomeDir + compchartimage;
|
String | filePath(String dirPath, String fileName) file Path return dirPath + "/" + fileName; |
String | filePath2PackageName(String entryName) file Path Package Name String pkgName = entryName.replace('/', '.').replace('\\', '.'); pkgName = pkgName.endsWith(".") ? pkgName.substring(0, pkgName.length() - 1) : pkgName; return pkgName; |
String | filePathBlackList(String value) file Path Black List String returnValue = value; if (returnValue == null || returnValue.trim().equals("")) { return ""; returnValue = returnValue.replaceAll("\\.\\./", ""); returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); return returnValue; |
void | filePathCheck(final String filePath) Check that the path is 'absolute' on the server if (filePath.charAt(0) != '/') { throw new IllegalArgumentException("Remote path should start with '/'"); |
String | filePathGen(String oldPath, String newExtension, String newFileName) Create a copy of a file in same directory but can rename and change it's extension if (newFileName.contains(".")) { newFileName = newFileName.substring(0, newFileName.lastIndexOf('.')); if (newExtension.charAt(0) != '.') { newExtension = "." + newExtension; String newPath = ""; if (newFileName != null) { ... |