Bookmark Topic Watch Topic
  • New Topic

File.setWritable() FilePermission Code snippet

 
Jaunty John
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Report post to moderator
In the File class, there is a setReadOnly() method. However, there is NOT a setWritable() method. I constanly see reference to the FilePermission class to solve this problem, BUT HAVE YET TO SEE A CODE SNIPPET EXAMPLE. And the Sun.Java documentation is so dense as to be meaningless. Has anyone seen a CODE SNIPPET (repeat, CODE SNIPPET) to accomplish the task of setting a FILE ATTRIBUTE TO A WRITABLE STATE?
Thanks in advance
JohnB
p.s. This seems to be a common question. I see another example posted on Moose(Java)Ranch today, and have never seen an answer, here or elsewhere. A CODE SNIPPET would fix this... jlb
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm closing this simply because, as you stated, you have another post already asking this question. You can stress the code snippet need there.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!