asio C++ library

PrevUpHomeNext
basic_stream_file::resize (2 of 2 overloads)

Inherited from basic_file.

Alter the size of the file.

void resize(
    uint64_t n,
    asio::error_code & ec);

This function resizes the file to the specified size, in bytes. If the current file size exceeds n then any extra data is discarded. If the current size is less than n then the file is extended and filled with zeroes.

Parameters

n

The new size for the file.

ec

Set to indicate what error occurred, if any.


PrevUpHomeNext