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

Function create_file

test/operations_unit_test.cpp:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46bool cleanup = true;
47
48void create_file(const path& ph, const std::string& contents = std::string())
49{
50 std::ofstream f(BOOST_FILESYSTEM_C_STR(ph));
51 if (!f)
52 throw filesystem_error("operations_test create_file", ph, error_code(errno, system_category()));
53 if (!contents.empty())
54 f << contents;
55}
56
57void check(bool ok, const char* file, int line)
58{

Callers 1

directory_entry_testFunction · 0.70

Calls 2

stringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected