Re: Using FileWriter.truncate() to extend the length of a file?

2010-08-27 Thread Eric Uhrhane
On Thu, Aug 26, 2010 at 2:04 PM, Darin Fisher da...@chromium.org wrote: I noticed that FileWriter.truncate() can only be used to shorten a file, and there does not seem to be a good way to grow a file using FileWriter without appending data to it.  By contrast, the POSIX ftruncate function can

Using FileWriter.truncate() to extend the length of a file?

2010-08-26 Thread Darin Fisher
I noticed that FileWriter.truncate() can only be used to shorten a file, and there does not seem to be a good way to grow a file using FileWriter without appending data to it. By contrast, the POSIX ftruncate function can be used to grow a file (zero padding it): From ftruncate(2): If the file