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

Function main

example/cpp11/files/async_file_copy.cpp:73–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71};
72
73int main(int argc, char* argv[])
74{
75 try
76 {
77 if (argc != 3)
78 {
79 std::cerr << "Usage: async_file_copy <from> <to>\n";
80 return 1;
81 }
82
83 boost::asio::io_context io_context;
84
85 file_copier copier(io_context, argv[1], argv[2]);
86 copier.start();
87
88 io_context.run();
89 }
90 catch (std::exception& e)
91 {
92 std::cerr << "Exception: " << e.what() << "\n";
93 return 1;
94 }
95
96 return 0;
97}
98
99#else // defined(BOOST_ASIO_HAS_FILE)
100int main() {}

Callers

nothing calls this directly

Calls 2

startMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected