MCPcopy Create free account
hub / github.com/biometrics/openbr / writeFile

Function writeFile

openbr/core/qtutils.cpp:69–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void writeFile(const QString &file, const QStringList &lines)
70{
71 if (file.isEmpty()) return;
72 const QString baseName = QFileInfo(file).baseName();
73
74 if (baseName == "terminal") {
75 printf("%s\n", qPrintable(lines.join("\n")));
76 } else if (baseName == "buffer") {
77 Globals->buffer = lines.join("\n").toStdString().c_str();
78 } else {
79 QFile f(file);
80 touchDir(f);
81
82 if (!f.open(QFile::WriteOnly))
83 qFatal("Failed to open %s for writing.", qPrintable(file));
84
85 foreach (const QString &line, lines)
86 f.write((line+"\n").toLocal8Bit());
87
88 f.close();
89 }
90}
91
92void writeFile(const QString &file, const QString &data)
93{

Callers 15

writeSigsetFunction · 0.85
EvaluateFunction · 0.85
InplaceEvalFunction · 0.85
EvalDetectionFunction · 0.85
EvalLandmarkingFunction · 0.85
EvalRegressionFunction · 0.85
writeMatrixFunction · 0.85
rankOutputMethod · 0.85
csvOutputMethod · 0.85
meltOutputMethod · 0.85
BR_PROPERTYMethod · 0.85
~tailOutputMethod · 0.85

Calls 5

touchDirFunction · 0.85
isEmptyMethod · 0.80
openMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected