List of utility methods to do Is Symbolic Link
boolean | isSymbolicLink(File file) Determines if a file is a symbolic link. if (file == null) { throw new NullPointerException("File must not be null"); File fileInCanonicalDir = null; if (file.getParent() == null) { fileInCanonicalDir = file; } else { File canonicalDir = file.getParentFile().getCanonicalFile(); ... |
boolean | isSymbolicLink(File file) is Symbolic Link try { final File canonicalFile = file.getCanonicalFile(); final File absoluteFile = file.getAbsoluteFile(); final File parentFile = file.getParentFile(); return !canonicalFile.getName().equals(absoluteFile.getName()) || parentFile != null && !parentFile.getCanonicalPath().equals(canonicalFile.getParent()); } catch (IOException e) { return true; ... |
boolean | isSymbolicLink(File file) is Symbolic Link return !file.getAbsolutePath().equals(file.getCanonicalPath());
|
boolean | isSymbolicLink(File file) is Symbolic Link try { File parent = file.getParentFile(); String name = file.getName(); File toTest = parent != null ? new File(parent.getCanonicalPath(), name) : new File(name); return !toTest.getAbsolutePath().equals(toTest.getCanonicalPath()); } catch (Exception e) { return false; |
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 base, File curious) Check if a file relative to a base path has a symlink, not counting any symlinks in base or above. if (base == null) { throw new NullPointerException("Base file must not be null"); if (curious == null) { throw new NullPointerException("Curious file must not be null"); File baseCanonical = base.getCanonicalFile(); File curiousResolved = new File(baseCanonical, curious.getPath()); ... |
boolean | isSymLink(File file) is Sym Link return !file.getAbsolutePath().equals(file.getCanonicalPath());
|
boolean | isSymlink(File file) is Symlink String baseName = file.getName(); String canonicalPathExceptBaseName = new File(file.getParentFile().getCanonicalFile(), baseName).getPath(); return !file.getCanonicalPath().equals(canonicalPathExceptBaseName); |
boolean | isSymlink(File file) is Symlink if (file == null) { throw new NullPointerException("File must not be null"); if (isSystemWindows()) { return false; File fileInCanonicalDir = null; if (file.getParent() == null) { ... |
boolean | isSymlink(File file) Determines whether the specified file is a Symbolic Link rather than an actual file. if (file == null) { throw new NullPointerException("File must not be null"); if (isSystemWindows()) { return false; File fileInCanonicalDir = null; if (file.getParent() == null) { ... |