PHP code example of alio / cli-file-tree

1. Go to this page and download the library: Download alio/cli-file-tree 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/ */

    

alio / cli-file-tree example snippets

 php

use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Output\BufferedOutput;

...

$output = new BufferedOutput;
Artisan::call('clifiletree', ['--filter' => 'csv'], $output);

$file = $output->fetch();

// do whatever you want with the $file

...