How to import all files under a specific folder and its sub-folders?

Any easy way to do this? Or do I need to do something like using scandir() recursively? Thanks!

if you wonna add classes you can define it in your config file






Thank you! But what I mean is, for example, I have some (not a few) sub-folders under "application.components", and I am looking for an easy way to import all files in all sub-folders instead of listing all sub-folders one by one or using something like scandir() recursively?

This option was tested but it was too slow and in the end removed from the framework…

Check the discussion here -

Thanks a lot! After reading the Comment 9 by project member qiang.xue, Sep 15, 2010, I know the BEST way is to import them one by one.