DirectoryContentsList doesn't work for me

Hello, I’ve this code in a constructor:

[code] m_Proceso = new TimeSliceThread(“Lectura browser”);
m_Proceso->startThread(3);

m_Lista = new DirectoryContentsList(0, *m_Proceso);
File m_Directorio1("D:\\Pruebas");
m_Lista->setDirectory(m_Directorio1, true, true);


int a = m_Lista->getNumFiles();

[/code]

‘int a’ always is 0, and D:\Pruebas does exist and have files. What am I doing wrong?

btw: I don’t understand very well Threads, they’re as visual basic’s “timers”? There isn’t too much documentation about them.

Thanks!!

You have to wait until isStillLoading() indicates that Juce has finished scanning the folder…!

Best wishes,

Pete

whooaaa, thanks you peteatjuce :slight_smile:

Always happy to help. :slight_smile: