scanDirectory()
scanDirectory(string $directory, array $extensions = null, callable $directoryCallback = null, callable $fileCallback = null) : \Phug\Renderer\Partial\iterable
Get all file matching extensions list recursively in a directory.
Parameters
string | $directory | directory to scan for files |
array | $extensions | optional extensions to filter the result (use 'extensions' setting if omitted) |
callable | $directoryCallback | optional function/closure to call for each sub-directory scanned (after files have been yielded). |
callable | $fileCallback | optional function/closure to call after each file yielded. |