MCPcopy Create free account
hub / github.com/alibaba/async_simple / resize

Function resize

demo_example/asio/asio/basic_file.hpp:722–727  ·  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 asio::system_error Thrown on failure. */

Source from the content-addressed store, hash-verified

720 * @throws asio::system_error Thrown on failure.
721 */
722 void resize(uint64_t n)
723 {
724 asio::error_code ec;
725 impl_.get_service().resize(impl_.get_implementation(), n, ec);
726 asio::detail::throw_error(ec, "resize");
727 }
728
729 /// Alter the size of the file.
730 /**

Callers 2

Calls 2

throw_errorFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected