List of utility methods to do Unix Path
String | getUNIXfilePath(String fileName) get UNI Xfile Path File file = new File(fileName); return toUNIXpath(file.getAbsolutePath()); |
String | getUnixRelativePath(File base, File path) get Unix Relative Path return base.toURI().relativize(path.toURI()).getPath().replace("\\", "/"); |
String | toUNIXfilePath(String fileName) to UNI Xfile Path return toUNIXpath(toformatPath(fileName));
|
String | unixizeWindowsAbsolutePath(final String pathToCheck) Turn absolute Windows paths into unix-friendly equivalent. final String path; if (pathToCheck.length() >= 1 && isKnownPathDelimiter(pathToCheck.charAt(0))) { path = pathToCheck.substring(1); } else { path = pathToCheck; if (path.length() >= 2 && path.charAt(1) == ':') { if (path.length() >= 3 && isKnownPathDelimiter(path.charAt(2))) { ... |
String | unixPath(String sText) Convert path to unix style path if (sText == null || sText.equals("")) return ""; sText = replace(sText, '\\', "/"); return sText; |
String | unixPathStr(String anyPath) unix Path Str String unixPath = anyPath.replace("\\", "/"); return (unixPath); |
String | unixPathToWindows(String strPath) unix Path To Windows if (strPath == null || strPath.length() == 0 || OSNAME == null || !OSNAME.startsWith("Windows")) return strPath; StringBuffer sbPath = new StringBuffer(strPath.trim()); String strunix = "/dev/fs/"; int nIndex = sbPath.indexOf(strunix); int index = sbPath.indexOf("\\dev\\fs"); if (strPath.indexOf(":") != 1) { if (strPath.equals("/vnmr") || strPath.startsWith("/vnmr/")) ... |
String | unixToUserPathName(String unixPathName) unix To User Path Name if (unixPathName.startsWith("~/")) { return "${user.home}" + unixPathName.substring(1); } else { String userHome = System.getProperty("user.home"); int len = userHome.length(); if (unixPathName.startsWith(userHome) && unixPathName.charAt(len) == '/') { return "${user.home}" + unixPathName.substring(len); } else { ... |