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

Function create_file

test/operations_test.cpp:180–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178const fs::path temp_dir(fs::unique_path("op-test-%%%%-%%%%"));
179
180void create_file(const fs::path& ph, const std::string& contents = std::string())
181{
182 std::ofstream f(BOOST_FILESYSTEM_C_STR(ph));
183 if (!f)
184 throw fs::filesystem_error("operations_test create_file", ph, error_code(errno, system_category()));
185 if (!contents.empty())
186 f << contents;
187}
188
189void verify_file(const fs::path& ph, const std::string& expected)
190{

Callers 13

create_treeFunction · 0.70
directory_iterator_testsFunction · 0.70
permissions_testsFunction · 0.70
rename_testsFunction · 0.70
resize_file_testsFunction · 0.70
remove_testsFunction · 0.70
remove_symlink_testsFunction · 0.70
remove_all_testsFunction · 0.70
remove_all_symlink_testsFunction · 0.70
copy_file_testsFunction · 0.70
creation_time_testsFunction · 0.70
write_time_testsFunction · 0.70

Calls 2

stringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected