PHP code example of amekusa / phio

1. Go to this page and download the library: Download amekusa/phio library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amekusa / phio example snippets


use amekusa\phio\Directory;

$dir = new Directory('/srv/http');
foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}

use amekusa\phio\Directory;
use amekusa\phio\Filter;

$dir = new Directory('/srv/http');
$dir->addFilter(new Filter('s*.*s'));

foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}

use amekusa\phio\Directory;
use amekusa\phio\RegexFilter;

$dir = new Directory('/srv/http');
$dir->addFilter(new RegexFilter('/\.[a-z]{3}$/'));

foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}