Version 2 of chan truncate

Updated 2007-01-28 14:06:48

Truncate the file behind the given channel at the given location (or the current by default). Operation is (probably) not supported by non-file channels.

chan truncate channelId ?length?

Like the ftruncate() call in C's stdio.


AMG: For one possible use of this command, see How do I remove one line from a file?.


[ Category Command of Tcl 8.5 | Category Channel ]