MCPcopy Create free account
hub / github.com/boostorg/filesystem / impl

Method impl

src/operations.cpp:716–723  ·  view source on GitHub ↗

copy_file implementation wrapper that preallocates storage for the target file before invoking the underlying copy implementation

Source from the content-addressed store, hash-verified

714{
715 //! copy_file implementation wrapper that preallocates storage for the target file before invoking the underlying copy implementation
716 static int impl(int infile, int outfile, uintmax_t size, std::size_t blksize)
717 {
718 int err = preallocate_storage(outfile, size);
719 if (BOOST_UNLIKELY(err != 0))
720 return err;
721
722 return CopyFileData::impl(infile, outfile, size, blksize);
723 }
724};
725
726// Min and max buffer sizes are selected to minimize the overhead from system calls.

Callers

nothing calls this directly

Calls 2

preallocate_storageFunction · 0.85
implClass · 0.85

Tested by

no test coverage detected