[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another simple question
- Date: Mon, 01 Nov 2004 14:26:33 -0500
- From: esutter at lucent.com (Ed Sutter)
- Subject: Another simple question
Etienne Fortin wrote:
> It may seem like a newbie question, but how can I redim a file? I mean,
> let's say my file is 12000 bytes and I want to truncate it to 11500
> bytes, how to scrap the 500 last bytes without having to create a new
> file and copy only 11500 bytes to it? Is there a way with std C?
> Etienne Fortin
Not sure if they're in RTEMS, but generally speaking the functions
truncate() and ftruncate() do this for you.