$dir = '/path/to/directory'; $files = t3lib_div::getFilesInDir($dir); print_r($files);
$dir = '/path/to/directory'; $files = t3lib_div::getFilesInDir($dir, 'png'); print_r($files);
$dir = '/path/to/directory'; $files = t3lib_div::getFilesInDir($dir, '', true); print_r($files);This code retrieves a list of all files within the specified directory and any subdirectories. In conclusion, t3lib_div getFilesInDir is a function provided by the TYPO3 CMS package library that allows you to retrieve a list of all files within a specified directory.