From kfm-devel Fri Jul 23 13:09:03 1999 From: Waldo Bastian Date: Fri, 23 Jul 1999 13:09:03 +0000 To: kfm-devel Subject: Re: Kio_file & Rollback X-MARC-Message: https://marc.info/?l=kfm-devel&m=93273796029332 Matt Koss wrote: > > I want to implement rollback in kio_file. > This means, that when the transfer is interrupted, slave will take some bytes > from the end of the file and put them away. > Later, when resumed, this will make sure that there is not any trailing garbage. > > But what's the easiest thing to achieve it ? > > Is there some simple method for cutting some data from the end of the local > file ? Yes. truncate() is your friend. Not sure if it is defined by POSIX. See your local man page. Cheers, Waldo -- The "gui" in "Penguin" is pronounced "K-D-E"