Hi,
that's only example code, it's not intended to be "complete" or "perfect" - take it as a starting point for your own projects.
Are your sure that you need an array ? Perhaps you can live without reading the whole directory. Or you don't need it at all.
Or, maybe use subirectories and only read ther content. Or alphabetically i.e. read only "'A*", 'B*", or...... maybe you have a better idea
that's only example code, it's not intended to be "complete" or "perfect" - take it as a starting point for your own projects.
Are your sure that you need an array ? Perhaps you can live without reading the whole directory. Or you don't need it at all.
Or, maybe use subirectories and only read ther content. Or alphabetically i.e. read only "'A*", 'B*", or...... maybe you have a better idea