title: How to open a file for both reading and writing?
body: <p>Is there a way to open a file for both reading and writing?</p>
  
  <p>As a workaround, I open the file for writing, close it, then open it again for reading. But is there a way to open a file for <em>both</em> reading and writing?</p>