Mecha CMS

Files::from()

Bulk file instance from a folder.

2.2.0 Static

Files::from(string $folder = ROOT, $x = 1, $deep = 0);

Example:

$files = Files::from('.\path\to\folder');

foreach ($files as $file) {
    echo $file->name . '<br>';
}