Recursive Glob

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.

Adam Patterson

Adam Patterson

User Interface Designer & Developer with a background in UX. I have spent 5 years as a professionally certified bicycle mechanic and ride year-round.

I am a husband and father of two, I enjoy photography, music, movies, coffee, and good food.

You can find me on Twitter @adampatterson and Instagram

Signup for my mailing list

Receive other rambings like this on design, code, and some times food.