juce_fileExists


#1

bool juce_fileExists (const String& fileName, const bool dontCountDirectories) { if (fileName.isEmpty()) return ! dontCountDirectories;

Is there a reason for this? Why does it ever return true for an empty string?


#2

Because the path always omits the trailing slash, so an empty string is actually “/”, and if you’re looking for a directory, that does exist.


#3

Ah, ok.


#4