
13 Oct
2009
13 Oct
'09
3:18 p.m.
Forgive me for the n00b-ish (and slightly offtopic) question, but is there any way in standard C++ or in Boost.Filesystem to truncate a file to a particular size? With std::ofstream, I can either truncate a file on open to 0 size, or else open it in overwrite mode and scribble over it, but when I'm done, I don't seem to have a way of saying, "The end of the file is now *here*." Is that right? And if so, does Boost.Filesystem have an API for this? Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com