anchor.diff:    openedFile.writeList(data, 0, data.length);
     openedFile.onError = (e) {
       checkWriteReadOnlyFileException(e);
  -    p.toSendPort().send(null);
  +    openedFile.close(() => p.toSendPort().send(null));
     };
   }
   
  
positive.code:   openedFile.writeByte(0);
    openedFile.onError = (e) {
      checkWriteReadOnlyFileException(e);
      p.toSendPort().send(null);
    };
  }
  
  
negative.code: 
    var file = new File("${temp.path}/test_file");
    file.createSync();
    var openedFile = file.openSync(FileMode.WRITE);
    openedFile.writeByteSync(0);
    openedFile.closeSync();
    openedFile = file.openSync(FileMode.READ);
  
    // Truncating read only file should throw an exception.
    Expect.throws(() => openedFile.truncateSync(0),
  