PHP code example of m2mtech / flysystem-stream-wrapper
1. Go to this page and download the library: Download m2mtech/flysystem-stream-wrapper 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/ */
m2mtech / flysystem-stream-wrapper example snippets
use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;
use M2MTech\FlysystemStreamWrapper\FlysystemStreamWrapper;
$filesystem = new Filesystem(new LocalFilesystemAdapter('/some/path'));
FlysystemStreamWrapper::register('fly', $filesystem);
file_put_contents('fly://filename.txt', $content);
mkdir('fly://happy_thoughts');
FlysystemStreamWrapper::unregister('fly');