List of utility methods to do File Link Check
boolean | isSymbolicLink(File parent, String name) is Symbolic Link if (parent == null) { File f = new File(name); parent = f.getParentFile(); name = f.getName(); File toTest = new File(parent.getCanonicalPath(), name); return !toTest.getAbsolutePath().equals(toTest.getCanonicalPath()); |
boolean | isSymlink(File file) is Symlink if (file == null) throw new NullPointerException("File must not be null"); File canon; if (file.getParent() == null) { canon = file; } else { File canonDir = file.getParentFile().getCanonicalFile(); canon = new File(canonDir, file.getName()); ... |