From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 14 Oct 2004 20:52:36 -0400 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] how to truncate a file? In-Reply-To: <65d6317baf9a0d50fa2cbcd4c1d4a69f@collyer.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <7120ecbe8d685456cf35dc5578209eca@orthanc.cc.titech.ac.jp> <65d6317baf9a0d50fa2cbcd4c1d4a69f@collyer.net> Topicbox-Message-UUID: ee9fe7d6-eacd-11e9-9e20-41e7f4b1d025 ape's ftruncate predates 9P2000. on fossil you can use int ftruncate(int fd, vlong length) { Dir d; nulldir(&d); d.length = length; return dirfwstat(fd, &d); } russ