MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / readFile

Method readFile

context/ContextManager.cpp:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26{}
27
28QString ContextManager::readFile(const QString &filePath) const
29{
30 QFile file(filePath);
31 if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
32 LOG_MESSAGE(QString("Failed to open file for reading: %1 - %2")
33 .arg(filePath, file.errorString()));
34 return QString();
35 }
36
37 QTextStream in(&file);
38 QString content = in.readAll();
39 file.close();
40
41 return content;
42}
43
44QList<ContentFile> ContextManager::getContentFiles(const QStringList &filePaths) const
45{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected