Name: diC59631 Date: 08/19/98 Why not : java.io.File.setReadOnly(boolean mode) to be able to set it true/false as for a lock-file mechanism ? (Review ID: 37210) ====================================================================== Name: rmT116609 Date: 11/20/2000 java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed mode) in the java.io.class there is a method to make a file read only. however this can't be undone. we need a methos like setReadOnly(boolean). calling this method with a false argument should make the file modifiable. we also need a method isReadOnly() to test this condition. thanks (Review ID: 112499) ====================================================================== Name: rmT116609 Date: 02/08/2001 java version "1.3.0" java.io.File class can set read-only attribute on a file (with setReadOnly() method) but it cannot clear it. If a Java program encounters a read-only file which it needs to write or delete, it can only do that using JNI. It's also unable to undo the effect of previous setReadOnly() call if it makes one. IMO there should be a method like setReadOnly(boolean) so that setReadOnly(false) would make the file writeable or throw an IOException is such operation is not allowed (Review ID: 116607) ======================================================================
|