MCPcopy Create free account
hub / github.com/docling-project/docling-parse / write_file

Function write_file

app/page_images.cpp:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace fs = std::filesystem;
19
20static void write_file(fs::path const& p, std::shared_ptr<Buffer> const& buf)
21{
22 std::ofstream out(p, std::ios::binary);
23 if (!out)
24 {
25 throw std::runtime_error("unable to open output file: " + p.string());
26 }
27 out.write(reinterpret_cast<char const*>(buf->getBuffer()),
28 static_cast<std::streamsize>(buf->getSize()));
29}
30
31static std::vector<std::string> get_filters(QPDFObjectHandle& stream)
32{

Callers 1

mainFunction · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected