You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize use of the iterators:
1. Skip dot files at the `RecursiveDirectoryIterator` level by setting the `FilesystemIterator::SKIP_DOTS` flag and remove the code which was doing the same in the callback.
Note: the other two flags are the default flags used by the `RecursiveDirectoryIterator` constructor, so are needed to maintain the existing behaviour.
2. No need for the `$file->getPathname()` function call. The `$key` already contains that information, as per the default flags.
3. No need for a file-system `is_dir()` call. If it's a directory, the iterator will have children.
0 commit comments