80 void setDirectory (
const File& directory,
81 bool includeDirectories,
92 bool isFindingFiles() const noexcept {
return (fileTypeFlags & File::findFiles) != 0; }
101 bool isStillLoading()
const;
106 void setIgnoresHiddenFiles (
bool shouldIgnoreHiddenFiles);
111 bool ignoresHiddenFiles()
const;
120 void setFileFilter (
const FileFilter* newFileFilter);
167 int getNumFiles() const noexcept;
179 bool getFileInfo (
int index,
FileInfo& resultInfo) const;
187 File getFile (
int index) const;
192 const
FileFilter* getFilter() const noexcept {
return fileFilter; }
195 bool contains (
const File&)
const;
199 TimeSliceThread& getTimeSliceThread() const noexcept {
return thread; }
203 const FileFilter* fileFilter =
nullptr;
204 TimeSliceThread& thread;
205 int fileTypeFlags = File::ignoreHiddenFiles | File::findFiles;
207 CriticalSection fileListLock;
208 OwnedArray<FileInfo> files;
213 bool wasEmpty =
true;
215 int useTimeSlice()
override;
216 void stopSearching();
218 bool checkNextFile (
bool& hasChanged);
219 bool addFile (
const File&,
bool isDir, int64 fileSize, Time modTime,
220 Time creationTime,
bool isReadOnly);
221 void setTypeFlags (
int);
A class to asynchronously scan for details about the files in a directory.
const File & getDirectory() const noexcept
Returns the directory that's currently being used.
bool isFindingFiles() const noexcept
Returns true if this list contains files.
bool isFindingDirectories() const noexcept
Returns true if this list contains directories.
bool isDirectory
True if the file is a directory.
bool isReadOnly
True if the file is read-only.
Contains cached information about one of the files in a DirectoryContentsList.