$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] reducing file size after I am done with an mmap
From: Arash Partow (arash_at_[hidden])
Date: 2010-12-18 00:44:44
On 18/12/2010 11:12 AM, Clark Sims wrote:
> Is there some way to downsize a file?
>
In unix land:
#include <unistd.h>
int ftruncate(int fildes, off_t length);
int truncate(const char *path, off_t length);
Another way is to seek to the offset then writ a block of zero length.
In windows land:
SetEndOfFile() (I think.....)