public static void setReadOnlyAttribute(VirtualFile file, boolean readOnlyStatus) throws IOException {
    if (file.getFileSystem().isReadOnly()) {
      throw new IllegalArgumentException("Wrong file system: " + file.getFileSystem());
    }

    boolean writable = !readOnlyStatus;
    if (file.isWritable() != writable) {
      file.setWritable(writable);
    }
  }
public static void setReadOnlyAttribute(VirtualFile file, boolean readOnlyStatus)