28 : wildCards (parseWildcards (
pattern)),
31 path (
File::addTrailingSeparator (
directory.getFullPathName())),
37 jassert (type > 0 && type <= 7);
53bool DirectoryIterator::fileMatches (
const StringArray& wildcards,
const String& filename)
55 for (
auto& w : wildcards)
56 if (filename.matchesWildcard (w, ! File::areFileNamesCaseSensitive()))
64 return next (
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr);
72 hasBeenAdvanced =
true;
74 if (subIterator !=
nullptr)
85 while (fileFinder.next (filename, &isDirectory,
99 true, wildCard, whatToLookFor));
109 if (matches && (isRecursive || wildCards.
size() > 1))
110 matches = fileMatches (wildCards, filename);
113 matches = ! isHidden;
124 if (subIterator !=
nullptr)
139 if (subIterator !=
nullptr && subIterator->hasBeenAdvanced)
140 return subIterator->getFile();
143 jassert (hasBeenAdvanced);
150 if (totalNumFiles < 0)
153 if (totalNumFiles <= 0)
156 auto detailedIndex = (subIterator !=
nullptr) ? index + subIterator->getEstimatedProgress()
const File & getFile() const
float getEstimatedProgress() const
DirectoryIterator(const File &directory, bool isRecursive, const String &wildCard="*", int whatToLookFor=File::findFiles)
int getNumberOfChildFiles(int whatToLookFor, const String &wildCardPattern="*") const
@ findFilesAndDirectories
static File createFileWithoutCheckingPath(const String &absolutePath) noexcept
void removeEmptyStrings(bool removeWhitespaceStrings=true)
int size() const noexcept
int addTokens(StringRef stringToTokenise, bool preserveQuotedStrings)
bool containsOnly(StringRef charactersItMightContain) const noexcept