MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / appendToFile

Method appendToFile

3rdparty/qtcsv-qt5/sources/writer.cpp:66–89  ·  view source on GitHub ↗

Append information to the file @input: - filePath - string with absolute path to csv-file - content - not empty handler of content for csv-file - codec - pointer to codec object that would be used for file writing @output: - bool - True if data was appended to the file, otherwise False

Source from the content-addressed store, hash-verified

64// @output:
65// - bool - True if data was appended to the file, otherwise False
66bool WriterPrivate::appendToFile(
67 const QString& filePath,
68 ContentIterator& content,
69 QTextCodec* codec)
70{
71 if (filePath.isEmpty() || content.isEmpty())
72 {
73 qDebug() << __FUNCTION__ << "Error - invalid arguments";
74 return false;
75 }
76
77 QFile csvFile(filePath);
78 if (false == csvFile.open(QIODevice::Append | QIODevice::Text))
79 {
80 qDebug() << __FUNCTION__ << "Error - can't open file:" <<
81 csvFile.fileName();
82 return false;
83 }
84
85 bool result = writeToIODevice(csvFile, content, codec);
86 csvFile.close();
87
88 return result;
89}
90
91// Overwrite file with new information
92// @input:

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected