title: How to limit file size when writing one?
body: <p>I am using the output streams from the io module and writing to files. I want to be able to detect when I have written 1G of data to a file and then start writing to a second file. I can't seem to figure out how to determine how much data I have written to the file.</p>
  
  <p>Is there something easy built in to <code>io</code>? Or might I have to count the bytes before each write manually?</p>