copy_file implementation wrapper that preallocates storage for the target file before invoking the underlying copy implementation
| 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. |
nothing calls this directly
no test coverage detected