PHP code example of biurad / flysystem

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

    

biurad / flysystem example snippets


// Let's use the local filesystem for this example.
$driver = new League\Flysystem\Adapter\Local(getcwd());

use Biurad\FileManager\FileManager;
use Biurad\FileManager\Config\FileConfig;

$filesystem = new FileManager($driver, new FileConfig()); // $driver from the previous

return $filesystem->put('file.txt', 'Contents');

use League\Flysystem\Cached\CachedAdapter;
use League\Flysystem\Cached\Storage\Memory;
use Biurad\FileManager\Config\FileConfig;

$caching = new CachedAdapter($driver, new Memory());
$filesystem = new FileManager($caching, new FileConfig()); // $driver from the previous

return $filesystem->put('file.txt', 'Contents');