Re: Truncate beginning of a file

2008-05-04 Thread Ben Finney
[EMAIL PROTECTED] writes: > file.truncate(X) will truncate the file to at most X bytes (i.e. > leave the first X bytes of the file and throw away the rest). Yes, by (IIRC) asking the filesystem to do this in a simple operation. Most (all?) filesystems support this operation either directly or wit

Re: Truncate beginning of a file

2008-05-04 Thread Marc 'BlackJack' Rintsch
On Sun, 04 May 2008 22:06:42 -0700, s0suk3 wrote: > file.truncate(X) will truncate the file to at most X bytes (i.e. leave > the first X bytes of the file and throw away the rest). Is there a way > to throw away, say, the first X bytes of the file, and leave the rest? > (Without opening the same f

Truncate beginning of a file

2008-05-04 Thread s0suk3
file.truncate(X) will truncate the file to at most X bytes (i.e. leave the first X bytes of the file and throw away the rest). Is there a way to throw away, say, the first X bytes of the file, and leave the rest? (Without opening the same file for reading, reading and processing, overwriting the fi