|
Java™ by example!
|
|
|
How do I make a file read-only?
Use the method setReadOnly in the File class. Notice that there is no method to determine whether a file is read-only or not, neither is there a method to undo the setReadOnly operation: Main.java:
When you execute (Windows DOS-prompt) attrib main.java, you'll see:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|