twistor/flysystem-stream-wrapper

Adapts Flysystem filesystems to PHP stream wrappers.

Maintainers

👁 twistor

Package info

github.com/twistor/flysystem-stream-wrapper

Homepage

pkg:composer/twistor/flysystem-stream-wrapper

Statistics

Installs: 2 761 848

Dependents: 10

Suggesters: 5

Stars: 58

Open Issues: 14

v1.0.9 2018-11-14 06:41 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT c97389f188a6493759389861f9fc732652460c58

  • Chris Leppanen <chris.leppanen.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-04 15:31:47 UTC


README

👁 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.