I've had success with the PEAR File_Find package, specifically the mapTreeMultiple() method. Your code would become something like:
require_once 'File/Find.php';
$fileList = File_Find::mapTreeMultiple($dirPath);
This should return an array similar to what you're asking for.