Java Is Link File isLink(File file)

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

Description

is Link

License

Open Source License

Declaration

public static boolean isLink(File file) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.io.IOException;

public class Main {
    public static boolean isLink(File file) {//not pure yet
        try {//  www. jav a2s. c o  m
            if (!file.exists()) {
                return true;
            } else {
                String cnnpath = file.getCanonicalPath();
                String abspath = file.getAbsolutePath();
                return !abspath.equals(cnnpath);
            }
        } catch (IOException ex) {
            System.err.println(ex);
            return true;
        }
    }
}

Related

  1. isLink(@Nonnull File file)
  2. isLink(File file)
  3. isLink(File file)
  4. isLink(final File file)
  5. isLink(java.io.File f)