MCPcopy Create free account
hub / github.com/boostorg/asio / resize

Function resize

include/boost/asio/basic_file.hpp:831–836  ·  view source on GitHub ↗

Alter the size of the file. * This function resizes the file to the specified size, in bytes. If the * current file size exceeds @c n then any extra data is discarded. If the * current size is less than @c n then the file is extended and filled with * zeroes. * * @param n The new size for the file. * * @throws boost::system::system_error Thrown on failure. */

Source from the content-addressed store, hash-verified

829 * @throws boost::system::system_error Thrown on failure.
830 */
831 void resize(uint64_t n)
832 {
833 boost::system::error_code ec;
834 impl_.get_service().resize(impl_.get_implementation(), n, ec);
835 boost::asio::detail::throw_error(ec, "resize");
836 }
837
838 /// Alter the size of the file.
839 /**

Callers 2

Calls 2

throw_errorFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected