From: Reinhard M. <Rei...@m4...> - 2004-06-25 15:18:59
|
On Fri, 25 Jun 2004 at 15:23, Neil Madden wrote: > I'll get the obvious question out of the way - why not [file truncate]? That was my first thought as well, when I saw the name. While I like the proposed functionality I don't feel comfortable with adding it as a separate command. One reason for proposing a separate command could be, that no subcommand of [file] currently takes an open file (i.e. a channel identifier) as it's argument. They all work on file names. Another candidate might be fconfigure. It always takes a channel argument, but current options manipulate the state of the channel rather than the underlaying file. But would it really be so bad to add a new class of subcommands to [file], that are called with channels, or add the truncate functionality to fconfigure, which is the central command for manipulating channels? BTW, while thinking about more missing file operations, flock() comes into mind, which I think would be a good addition to fconfigure, next to -blocking, and -buffering. cu Reinhard |