Directory contents:
array (4)
0 => array (6)
| type => "dir" (3) | path => "my/folder/folder-2" (18) | timestamp => 1510940138 | dirname => "my/folder" (9) | basename => "folder-2" (8) | filename => "folder-2" (8)
1 => array (8)
| type => "file" (4) | path => "my/folder/folder-2/test-3.txt" (29) | timestamp => 1510940138 | size => 0 | dirname => "my/folder/folder-2" (18) | basename => "test-3.txt" (10) | extension => "txt" (3) | filename => "test-3" (6)
2 => array (8)
| type => "file" (4) | path => "my/folder/test-2.txt" (20) | timestamp => 1510940138 | size => 0 | dirname => "my/folder" (9) | basename => "test-2.txt" (10) | extension => "txt" (3) | filename => "test-2" (6)
3 => array (8)
| type => "file" (4) | path => "my/folder/test.txt" (18) | timestamp => 1510940138 | size => 0 | dirname => "my/folder" (9) | basename => "test.txt" (8) | extension => "txt" (3) | filename => "test" (4)

Directory paths:
array (4)
0 => "my/folder/folder-2" (18) 1 => "my/folder/folder-2/test-3.txt" (29) 2 => "my/folder/test-2.txt" (20) 3 => "my/folder/test.txt" (18)

Directory files:
array (3)
0 => array (8)
| type => "file" (4) | path => "my/folder/folder-2/test-3.txt" (29) | timestamp => 1510940138 | size => 0 | dirname => "my/folder/folder-2" (18) | basename => "test-3.txt" (10) | extension => "txt" (3) | filename => "test-3" (6)
1 => array (8)
| type => "file" (4) | path => "my/folder/test-2.txt" (20) | timestamp => 1510940138 | size => 0 | dirname => "my/folder" (9) | basename => "test-2.txt" (10) | extension => "txt" (3) | filename => "test-2" (6)
2 => array (8)
| type => "file" (4) | path => "my/folder/test.txt" (18) | timestamp => 1510940138 | size => 0 | dirname => "my/folder" (9) | basename => "test.txt" (8) | extension => "txt" (3) | filename => "test" (4)
Source Preview
<?php
/**
 * Filesystem Listing
 * Webino Example
 */

use WebinoAppLib\Event\RouteEvent;
use 
WebinoAppLib\Response\Content\SourcePreview;
use 
WebinoAppLib\Router\DefaultRoute;
use 
WebinoHtmlLib\Html;

require 
__DIR__ '/../../vendor/autoload.php';

$debugger Webino::debugger(Webino::debuggerOptions()->setDevMode()->setBar());

$app Webino::application(null$debugger)->bootstrap();

// setup
$app->file()->write('my/folder/test.txt'null);
$app->file()->write('my/folder/test-2.txt'null);
$app->file()->write('my/folder/folder-2/test-3.txt'null);

$app->bind(DefaultRoute::class, function (RouteEvent $event) {
    
/**
     * Listing directory
     * contents recursively.
     */
    
$list $event->getApp()->file()->listContents('my/folder'true);

    
/**
     * Listing directory
     * paths recursively.
     */
    
$paths $event->getApp()->file()->listPaths('my/folder'true);

    
/**
     * Listing directory
     * files recursively.
     */
    
$files $event->getApp()->file()->listFiles('my/folder'true);

    
$event->setResponse([
        
'Directory contents:',
        
$event->getApp()->debug($listtrue),
        new 
Html\HorizontalLine,
        
'Directory paths:',
        
$event->getApp()->debug($pathstrue),
        new 
Html\HorizontalLine,
        
'Directory files:',
        
$event->getApp()->debug($filestrue),
        new 
SourcePreview(__FILE__),
    ]);
});

$app->dispatch();

// cleanup
$app->file()->deleteDir('my');