java中调用文件setReadOnly()设成只读后 怎样取消只读属性

解决方案 »

  1.   

    public boolean setReadOnly()
    Marks the file or directory named by this abstract pathname so that only read operations are allowed. (After invoking this method the file or directory is guaranteed not to change until it is either deleted or 
    "ed to allow write access."
    ) Whether or not a read-only file or directory may be deleted depends upon the underlying system. 
      

  2.   

    用完setReadOnly()后
    FilePermission(strPath,"write")