a function to scan directories recursively and save the result to an array with informations like level, path, name and file informations.

you can optionally set a filter to return only files wich match the filter as extension.

download options for directories / recursive directory listing

you can download the source as PHP file,

open the file as plain text in a new window or

get the code in a textarea to copy it.