| Author |
Need to get/read executable permission from existing file in Java 1.5 (not grater)
|
Lukasek Jezek
Greenhorn
Joined: Jan 19, 2012
Posts: 2
|
|
Hi. I want to get/read executable permission (x) from existing file, but I'cant find solution in Java 1.5.
I know, that in Java 1.6 can invoke method of File class: f.canExecute(), but this method is existing since Java 1.6.
Can you help me?
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5877
|
|
Then apparently it's not possible with pure Java in 1.5. You'll have to either execute an external command (such as ls in linux) and parse the results or use JNI or JNA to create a native library to examine the file, or find an existing 3rd-party native library that does it.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32689
|
|
And welcome to the Ranch
|
 |
Lukasek Jezek
Greenhorn
Joined: Jan 19, 2012
Posts: 2
|
|
Ok, thanks for Help!
Welcome, Welcome ;)
|
 |
 |
|
|
subject: Need to get/read executable permission from existing file in Java 1.5 (not grater)
|
|
|