Boost logo

Boost Users :

Subject: Re: [Boost-users] truncate file to n bytes
From: Casimiro, Daniel C CIV NUWC NWPT (daniel.casimiro_at_[hidden])
Date: 2011-05-12 07:21:16


>
> I was wondering is there is any way to truncate the file-size to n
> bytes, while deleting from the end of the file? Does boost::filesystem
> support something like this?

Take a look at resize_file.

http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/reference.html#resize_file

~Dan




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net