|
Boost : |
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.....)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk