List of utility methods to do Canonical Path Create
String | getCanonicalPath(String path) get Canonical Path String canonPath; try { canonPath = new File(path).getCanonicalPath(); } catch (IOException e) { canonPath = path; return canonPath; |
String | getCanonicalPath(String s) Get the canonical path from string Added by JG 2016 File f = new File(s); try { s = f.getCanonicalPath(); } catch (IOException ex) { System.out.println("Get Canonical Path Failed!"); System.out.println(ex); ex.printStackTrace(); return s; |
String | getCanonicalPathIfPossible(java.io.File file) get Canonical Path If Possible if (file != null) { try { return file.getCanonicalPath(); } catch (java.io.IOException ioe) { return file.getAbsolutePath(); } else { return null; ... |
File | getCanonicalPathQuietly(String inPath) get Canonical Path Quietly return getCanonicalPathQuietly(inPath, false);
|
List | getCanonicalPaths(List filenames) get Canonical Paths List result = new ArrayList(); for (int i = 0; i < filenames.size(); i++) { File file = new File((String) filenames.get(i)); result.add(file.getCanonicalPath()); return result; |
String | getCanonicalPathWithoutFilename(String filename) get Canonical Path Without Filename final File file = new File(filename); String string = null; try { string = file.getCanonicalPath().substring(0, file.getCanonicalPath().indexOf(file.getName())); } catch (final IOException e) { e.printStackTrace(); return string; ... |
String | getCanonicalSubPath(File inBasepathDir, File inFile) get Canonical Sub Path return getCanonicalSubPath(inBasepathDir, inFile, false);
|