首页 > 代码库 > 使用boost的mapped file

使用boost的mapped file

#include <boost/iostreams/device/mapped_file.hpp>
std::string src_path = "/Users/alex/Movies/m3u8_videos/dance.mp4";
std::string dst_path = "/Users/alex/Movies/m3u8_videos/dance-copy.mp4";
void copy_file()
{
	boost::iostreams::mapped_file_params  params_src;
	params_src.path = src_path;
	boost::iostreams::mapped_file_source  mf_src;
	mf_src.open(params_src);
	if(mf_src.is_open())
	{
		unsigned char* p_src = http://www.mamicode.com/(unsigned char*)mf_src.data();>

使用boost的mapped file