我使用TYPO3 6.2.x我在某些目录中有文件夹和子文件夹。我可以将所有文件递归为
$files = \TYPO3\CMS\Core\Utility\GeneralUtility::getAllFilesAndFoldersInPath(array(), $dirPath, '', 0, 99, '');
$files = \TYPO3\CMS\Core\Utility\GeneralUtility::removePrefixPathFromList($files, $dirPath);
我得到以下:
file1
file2
directory1/file1
directory1/file2
directory1/subdirectory/file1
我需要获取文件和目录
file1
file2
directory1
file1
file2
directory1/subdirectory/
file1
我如何能够递归所有目录和文件?