MCPcopy Create free account
hub / github.com/MrKepzie/Natron / lookForFileRecursively

Function lookForFileRecursively

Engine/NodeGroupSerialization.cpp:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static QString lookForFileRecursively(const QString& dirPath, const QString& filenameUnPathed)
63{
64 QDir d(dirPath);
65 if (!d.exists()) {
66 return QString();
67 }
68 if (d.exists(filenameUnPathed)) {
69 return d.absoluteFilePath(filenameUnPathed);
70 }
71 QStringList subDirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
72 for (QStringList::const_iterator it = subDirs.begin(); it != subDirs.end(); ++it) {
73 QString ret = lookForFileRecursively(*it, filenameUnPathed);
74 if (!ret.isEmpty()) {
75 return ret;
76 }
77 }
78 return QString();
79
80}
81
82bool
83NodeCollectionSerialization::restoreFromSerialization(const std::list< boost::shared_ptr<NodeSerialization> > & serializedNodes,

Callers 1

Calls 4

QStringClass · 0.85
beginMethod · 0.45
endMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected