@xianc78 "like you do with arrays" I'm guessing you mean range-based for like
```` for ( auto dir_ent : dir.list() ) { ```` Yeah that would be fine and you could do that with a range.
But if you mean ```` for ( auto i = 0; i < dir_list.size(); ++i ) { auto dir_ent = dir_list[i]; ```` I have to think that's a bad idea. Think about what it would be like to implement dir_list in terms of `readdir` without allocating memory and scanning through the whole thing copying it over ahead of time.
@xianc78
"like you do with arrays"
I'm guessing you mean range-based for like
````
for ( auto dir_ent : dir.list() ) {
````
Yeah that would be fine and you could do that with a range.
But if you mean
````
for ( auto i = 0; i < dir_list.size(); ++i ) {
auto dir_ent = dir_list[i];
````
I have to think that's a bad idea. Think about what it would be like to implement dir_list in terms of `readdir` without allocating memory and scanning through the whole thing copying it over ahead of time.