52 const bool includeDirectories,
53 const bool includeFiles)
55 jassert (includeDirectories || includeFiles);
57 if (directory !=
root)
90 thread.removeTimeSliceClient (
this);
98 if (!
files.isEmpty())
111 if (
root.isDirectory())
116 thread.addTimeSliceClient (
this);
151 return root.getChildFile (
info->filename);
160 for (
int i =
files.size(); --
i >= 0;)
161 if (
root.getChildFile (
files.getUnchecked(
i)->filename) == targetFile)
181 bool hasChanged =
false;
183 for (
int i = 100; --
i >= 0;)
209 const auto entry = *(*fileFindHandle)++;
214 entry.getModificationTime(),
215 entry.getCreationTime(),
235 const int64 fileSize,
237 const bool isReadOnly)
245 auto info = std::make_unique<FileInfo>();
247 info->filename =
file.getFileName();
248 info->fileSize = fileSize;
249 info->modificationTime = modTime;
250 info->creationTime = creationTime;
251 info->isDirectory = isDir;
252 info->isReadOnly = isReadOnly;
254 for (
int i =
files.size(); --
i >= 0;)
255 if (
files.getUnchecked(
i)->filename ==
info->filename)
263 if (a->isDirectory != b->isDirectory)
264 return a->isDirectory;
267 return a->filename.compareNatural (b->filename) < 0;
#define noexcept
Definition DistrhoDefines.h:72
static bool findFiles(std::vector< water::File > &files, const BinaryType btype, const char *const pluginPath, const char *const wildcard)
Definition PluginDiscovery.cpp:622
static bool findDirectories(std::vector< water::File > &files, const char *const pluginPath, const char *const wildcard)
Definition PluginDiscovery.cpp:591
uint8_t a
Definition Spc_Cpu.h:141
void sendChangeMessage()
Definition juce_ChangeBroadcaster.cpp:65
void stopSearching()
Definition juce_DirectoryContentsList.cpp:87
void setFileFilter(const FileFilter *newFileFilter)
Definition juce_DirectoryContentsList.cpp:120
bool checkNextFile(bool &hasChanged)
Definition juce_DirectoryContentsList.cpp:203
bool getFileInfo(int index, FileInfo &resultInfo) const
Definition juce_DirectoryContentsList.cpp:133
OwnedArray< FileInfo > files
Definition juce_DirectoryContentsList.h:208
std::unique_ptr< RangedDirectoryIterator > fileFindHandle
Definition juce_DirectoryContentsList.h:210
bool ignoresHiddenFiles() const
Definition juce_DirectoryContentsList.cpp:45
void changed()
Definition juce_DirectoryContentsList.cpp:172
void setDirectory(const File &directory, bool includeDirectories, bool includeFiles)
Definition juce_DirectoryContentsList.cpp:51
bool addFile(const File &, bool isDir, int64 fileSize, Time modTime, Time creationTime, bool isReadOnly)
Definition juce_DirectoryContentsList.cpp:234
bool isStillLoading() const
Definition juce_DirectoryContentsList.cpp:167
bool wasEmpty
Definition juce_DirectoryContentsList.h:213
std::atomic< bool > isSearching
Definition juce_DirectoryContentsList.h:211
int getNumFiles() const noexcept
Definition juce_DirectoryContentsList.cpp:127
std::atomic< bool > shouldStop
Definition juce_DirectoryContentsList.h:211
void refresh()
Definition juce_DirectoryContentsList.cpp:105
File root
Definition juce_DirectoryContentsList.h:202
File getFile(int index) const
Definition juce_DirectoryContentsList.cpp:146
void clear()
Definition juce_DirectoryContentsList.cpp:94
void setIgnoresHiddenFiles(bool shouldIgnoreHiddenFiles)
Definition juce_DirectoryContentsList.cpp:39
DirectoryContentsList(const FileFilter *fileFilter, TimeSliceThread &threadToUse)
Definition juce_DirectoryContentsList.cpp:29
bool contains(const File &) const
Definition juce_DirectoryContentsList.cpp:156
int fileTypeFlags
Definition juce_DirectoryContentsList.h:205
CriticalSection fileListLock
Definition juce_DirectoryContentsList.h:207
TimeSliceThread & thread
Definition juce_DirectoryContentsList.h:204
const FileFilter * fileFilter
Definition juce_DirectoryContentsList.h:203
void setTypeFlags(int)
Definition juce_DirectoryContentsList.cpp:78
~DirectoryContentsList() override
Definition juce_DirectoryContentsList.cpp:34
int useTimeSlice() override
Definition juce_DirectoryContentsList.cpp:178
Definition juce_FileFilter.h:38
Definition juce_File.h:45
@ ignoreHiddenFiles
Definition juce_File.h:562
@ findDirectories
Definition juce_File.h:559
@ findFiles
Definition juce_File.h:560
Definition juce_RangedDirectoryIterator.h:100
Definition juce_Time.h:37
static uint32 getApproximateMillisecondCounter() noexcept
Definition juce_Time.cpp:261
friend class TimeSliceThread
Definition juce_TimeSliceThread.h:68
struct huft * t
Definition inflate.c:943
register unsigned i
Definition inflate.c:1575
unsigned f
Definition inflate.c:1572
struct backing_store_struct * info
Definition jmemsys.h:183
Definition carla_juce.cpp:31
CriticalSection::ScopedLockType ScopedLock
Definition juce_CriticalSection.h:186
long long int64
Definition juce_MathsFunctions.h:54
Definition juce_DirectoryContentsList.h:126
int result
Definition process.c:1455
struct zdirent * file
Definition win32.c:1500
#define const
Definition zconf.h:137