litp/flysystem-sae-storage

适用于新浪应用引擎存储的Flysystem适配器

dev-master / 1.0.x-dev 2016-02-21 11:06 UTC

This package is not auto-updated.

Last update: 2024-09-20 09:52:43 UTC


README

新浪应用引擎(SinaAppEngine)存储服务的Flysystem适配器。

安装

通过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');