• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to get/read executable permission from existing file in Java 1.5 (not grater)

 
Lukasek Jezek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49364
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Lukasek Jezek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks for Help!

Welcome, Welcome ;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic