DirectoryContentsList finding no files - what am I doing wrong?



I'm working on a project for uni and I'm having some troubles with using the DirectoryContentsList class.


I've successfully set the directory (manually for now, just to test it), and the isFindingFiles() function is returning true, yet the getNumFiles() function is returning 0. However, there are 3 files and a folder in the directory that I have set it to.


What's odd is that I swear it was working a few days ago...


Here's a snippet:


    testList = new DirectoryContentsList(nullptr, *testThread);

    testDirectory = "/Users/Duncs/Music/OldMusic/AS Music Tech";

    testList->setDirectory (testDirectory, true, true);


    DBG (testList->getNumFiles()); // printing 0.


    if (testList->isFindingFiles())

        DBG ("Finding files."); // printing, so isFindingFiles() must be returning true.



I've called isStillLoading() at various points throughout my code, and it always returns true. Surely it can't be taking forever to scan such a small directory?


I'm certain I've done something wrong somewhere, but I can't seem to find out what. Any help would be much appreciated.


Thanks in advance.

Ah, nevermind!


Turns out I was never starting the thread that I had allocated to it.


I don't think I'll ever understand threads properly!