53 Time* modTime,
Time* creationTime,
bool* isReadOnly)
57 hasBeenAdvanced =
true;
59 if (subIterator !=
nullptr)
61 if (subIterator->next (isDirResult, isHiddenResult, fileSize, modTime, creationTime, isReadOnly))
68 bool isDirectory, isHidden =
false, shouldContinue =
false;
70 while (fileFinder.next (filename, &isDirectory,
72 fileSize, modTime, creationTime, isReadOnly))
83 const auto mayRecurseIntoPossibleHiddenDir = [
this, &isHidden]
88 const auto mayRecurseIntoPossibleSymlink = [
this, &fullPath]
91 || ! fullPath.isSymbolicLink()
93 && knownPaths->find (fullPath.getLinkedTarget()) == knownPaths->end());
96 if (isRecursive && mayRecurseIntoPossibleHiddenDir() && mayRecurseIntoPossibleSymlink())
97 subIterator.reset (
new DirectoryIterator (fullPath,
true, wildCard, whatToLookFor, followSymlinks, knownPaths));
107 if (matches && (isRecursive || wildCards.size() > 1))
108 matches = fileMatches (wildCards, filename);
111 matches = ! isHidden;
115 currentFile = fullPath;
116 if (isHiddenResult !=
nullptr) *isHiddenResult = isHidden;
117 if (isDirResult !=
nullptr) *isDirResult = isDirectory;
122 if (subIterator !=
nullptr)
124 shouldContinue =
true;
130 if (! shouldContinue)