• Post Reply Bookmark Topic Watch Topic
  • New Topic

antidote for setReadOnly() ??

 
Maarten Vergouwen
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The setReadOnly() method of a File object makes it read-only... but how do you make it read/write again?
I'd expect a setReadWrite() method or even a generic setFileAttributes() method, but there doesnt seem to be one.
Is there a way to set a read-only file to read/write from Java (without invoking OS-specific commands) ?
TIA
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this post in the I/O and Streams forum for discussion on the subject.
 
Maarten Vergouwen
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
agh... that thread did not make me very happy
Thanks anyway though. I guess I'll have to copy-delete-save it instead...
[ February 14, 2004: Message edited by: Maarten Vergouwen ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the I/O and Streams forum...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!