author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 19 Nov 2010 00:34:26 +0100 | |
changeset 155 | a54dcc86addb |
parent 151 | a8c2649cf277 |
permissions | -rw-r--r-- |
151
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
1 |
public class Unix { |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
2 |
public static native int isUnixLink(String name); |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
3 |
|
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
4 |
public static boolean isLink(String name) { |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
5 |
if (isUnixLink(name) == 1) |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
6 |
return true; |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
7 |
return false; |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
8 |
} |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
9 |
|
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
10 |
static { |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
11 |
try { |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
12 |
System.loadLibrary("Unix"); |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
13 |
} catch (UnsatisfiedLinkError ule) { |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
14 |
ule.printStackTrace(); |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
15 |
} |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
16 |
} |
a8c2649cf277
FileTraverser Demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
17 |
} |