A PHP function that recursively scans and filters a directory tree, returning an array of values derived from a function applied to the filtered files.