$dir, 'name' => pathinfo($dir, PATHINFO_FILENAME), 'parent' => pathinfo($dir, PATHINFO_DIRNAME), ]); } }