MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / writeFile

Function writeFile

tests/test-macro-condition-file.cpp:13–21  ·  view source on GitHub ↗

Write (or overwrite) a file with the given content.

Source from the content-addressed store, hash-verified

11
12// Write (or overwrite) a file with the given content.
13static void writeFile(const QString &path, const QString &content)
14{
15 QFile f(path);
16 if (!f.open(QIODevice::WriteOnly | QIODevice::Text |
17 QIODevice::Truncate)) {
18 return;
19 }
20 QTextStream(&f) << content;
21}
22
23// ---------------------------------------------------------------------------
24// CONTENT_CHANGE

Callers 1

Calls 1

openMethod · 0.45

Tested by

no test coverage detected