Java Is Symbolic Link isSymLink(File file)

Here you can find the source of isSymLink(File file)

Description

is Sym Link

License

Apache License

Parameter

Parameter Description
file The file that is checked if it has a canonical path.

Exception

Parameter Description
IOException an exception

Return

True if the absolute path of the file differs from the canonical path, false otherwise.

Declaration

public static boolean isSymLink(File file) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

import java.io.IOException;

public class Main {
    /**//from ww  w.j a va 2 s .c o  m
     * 
     * @param file
     *       The file that is checked if it has 
     *       a canonical path.
     * @return
     *       True if the absolute path of the file 
     *       differs from the canonical path, false
     *       otherwise.
     * @throws IOException
     */
    public static boolean isSymLink(File file) throws IOException {
        return !file.getAbsolutePath().equals(file.getCanonicalPath());
    }
}

Related

  1. isSymbolicLink(File file)
  2. isSymbolicLink(File file)
  3. isSymbolicLink(File file)
  4. isSymbolicLink(File parent, String name)
  5. isSymlink(File base, File curious)
  6. isSymlink(File file)
  7. isSymlink(File file)
  8. isSymlink(File file)
  9. isSymlink(File file)