PHP code example of matraux / filesystem

1. Go to this page and download the library: Download matraux/filesystem 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/ */

    

matraux / filesystem example snippets


use Matraux\FileSystem\File\File;

$file = File::fromPath('C:\Users\MATRAUX\Webs\Resources\FileSystem\log.txt');
echo $file->name;  // "log.txt"

use Matraux\FileSystem\Folder\Folder;

$folder = Folder::fromPath()->addPath('backup');
echo $folder->absolute; // "C:\Users\MATRAUX\Webs\Resources\FileSystem\backup"