MCPcopy Create free account
hub / github.com/KDE/kdevelop / findFiles

Method findFiles

plugins/grepview/grepfindthread.cpp:175–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void FileFinder::findFiles(const QString& dirPath, int depth, QList<QUrl>& results)
176{
177 const QFileInfo info(dirPath);
178 const auto canonicalFilePath = info.canonicalFilePath();
179 if (info.isDir()) {
180 findFilesCanonical(canonicalFilePath, QStringLiteral("/"), depth, results);
181 return;
182 }
183
184 // Search in the single file at canonicalFilePath.
185 // canonicalFilePath is empty if the file does not exist.
186 if (!canonicalFilePath.isEmpty()) {
187 // Do not match against filters, because this particular file path is a search location.
188 results.push_back(QUrl::fromLocalFile(canonicalFilePath));
189 }
190}
191
192void FileFinder::findFilesCanonical(const QString& canonicalDirPath, const QString& pathRelativeToSearchLocation,
193 int depth, QList<QUrl>& results)

Callers 1

runMethod · 0.80

Calls 2

isEmptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected