Talk:Truncate a file

Revision as of 14:25, 19 July 2011 by rosettacode>Ledrug (truncate())

So just to be sure, if the actual file size is smaller than the given truncated size, it's an error? It doesn't just leave the file alone? --Mwn3d 14:09, 19 July 2011 (UTC)

POSIX truncate() and ftruncate() extends the file if specified size is larger than original. It's convenient when you want to reserve some disk space. --Ledrug 14:25, 19 July 2011 (UTC)
Return to "Truncate a file" page.