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

Function cpp_main

test/long_path_test.cpp:32–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30} // unnamed namespace
31
32int cpp_main(int, char*[])
33{
34
35 std::string prefix("d:\\temp\\");
36 std::cout << "prefix is " << prefix << '\n';
37
38 const std::size_t safe_size
39 = 260 - prefix.size() - 100; // Windows MAX_PATH is 260
40
41 std::string safe_x_string(safe_size, 'x');
42 std::string safe_y_string(safe_size, 'y');
43 std::string path_escape("\\\\?\\");
44
45 path x_p(prefix + safe_x_string);
46 path y_p(path_escape + prefix + safe_x_string + "\\" + safe_y_string);
47
48 std::cout << "x_p.native().size() is " << x_p.native().size() << '\n';
49 std::cout << "y_p.native().size() is " << y_p.native().size() << '\n';
50
51 create_directory(x_p);
52 BOOST_TEST(exists(x_p));
53 create_directory(y_p);
54 BOOST_TEST(exists(y_p));
55
56 //std::cout << "directory x.../y... ready for testing, where ... is " << safe_size
57 // << " repeats of x and y, respectively\n";
58
59 BOOST_TEST(exists(x_p));
60
61 //remove_all(x_p);
62
63 return ::boost::report_errors();
64}

Callers

nothing calls this directly

Calls 2

existsFunction · 0.85
create_directoryFunction · 0.50

Tested by

no test coverage detected