filetraverser/Unix.java
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sun, 24 Oct 2010 20:58:01 +0200
changeset 151 a8c2649cf277
permissions -rw-r--r--
FileTraverser Demo added Proper handling of symlinks in java apps committer: Markus Bröker <mbroeker@largo.homelinux.org>

public class Unix {
    public static native int isUnixLink(String name);

    public static boolean isLink(String name) {
        if (isUnixLink(name) == 1)
            return true;
        return false;
    }

    static {
        try {
            System.loadLibrary("Unix");
        } catch (UnsatisfiedLinkError ule) {
            ule.printStackTrace();
        }
    }
}