It’s possible to retrieve all permissions of a file in NTFS FileSystem with Java 6? I know in Java 7 it’s very simple. Anyone know some framework to do that?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe that Java 6 has the underlying OS hooks to handle this. Any library or code sample that you find to do this is going to have to use native code or something like Runtime.exec(). If you really need this functionality, you might just want to write a function that shells out and calls the appropriate Windows command to retrieve these permissions.
Also, take a look at this question for a good conversation on a similar subject: How do i programmatically change file permissions?