Skip to content

Provides the ability to register Flysystem filesystems as stream wrappers.

License

Notifications You must be signed in to change notification settings

Claromentis/flysystem-stream-wrapper

 
 

Repository files navigation

Flysystem stream wrapper

Author Build Status AppVeyor Coverage Status Software License Packagist Version Total Downloads

Installation

composer require twistor/flysystem-stream-wrapper

Usage

use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Twistor\FlysystemStreamWrapper;

// Get a Filesystem object.
$filesystem = new Filesystem(new Local('/some/path'));

FlysystemStreamWrapper::register('fly', $filesystem);

// Then you can use it like so.
file_put_contents('fly://filename.txt', $content);

mkdir('fly://happy_thoughts');

FlysystemStreamWrapper::unregister('fly');

Notes

This project tries to emulate the behavior of the standard PHP functions, rename(), mkdir(), unlink(), etc., as closely as possible. This includes emitting wanrings. If any differences are discovered, please file an issue.

About

Provides the ability to register Flysystem filesystems as stream wrappers.

Resources

License

Stars

Watchers

Forks

Languages

  • PHP 98.1%
  • Shell 1.9%