litp/flysystem-sae-storage

A Flysystem adapter for Sina App Engine Storage

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

This package is not auto-updated.

Last update: 2024-11-15 10:32:05 UTC


README

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