Recursive Glob

By Adam Patterson in: Code

While building the upgrade script for tentacle I knew that the file I was going to work with would be a zip, and would contain many sub folders.

PHP has a function called glob that finds files pathnames matching a pattern.

It works really well but only goes one level deep, using the recursive_glob() function lets you return a folders file structure.