chown and chmod in java

Is there a standard java api to do chown and chmod?
I really don't want to have to have to do Runtime.getRuntime().exec("chown blah /blah");
LVL 1
aturetskyAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
0
 
CEHJConnect With a Mentor Commented:
In a word, no. You'll have to do it for each OS
0
 
hoomanvConnect With a Mentor Commented:
java 1.6 suports file permissions
http://download.java.net/jdk6/docs/api/java/io/File.html

setWritable
setReadable
setExecutable
0
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
Platform specific commands should be stored in a properties-file preferably and not hard-coded in the code.
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.