A Flyststem Adaptor for SAE Storage
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
README.md
composer.json

README.md

flysystem-sae-storage

SinaAppEngine Storage服务的Flysystem Adapter.

安装

通过composer安装

composer require litp/flysystem-sae-storage

使用

生成filesystem对象:

use League\Flysystem\Filesystem;
use Litp\Flysystem\Storage;
use Litp\Flysystem\StorageAdapter;

$bucket = 'name of bucket here';

$client = new Storage();
$adapter = new StorageAdapter($client,$bucket);
$filesystem = new Filesystem($adapter);

使用filesystem对象,更多参见Flysystem网站

$filesystem->has('path/to/file');
$filesystem->put('path/to/file');
$filesystem->read('path/to/file');