PHPackages                             wyrihaximus/react-filesystem-s3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. wyrihaximus/react-filesystem-s3

ActiveLibrary[File &amp; Storage](/categories/file-storage)

wyrihaximus/react-filesystem-s3
===============================

5102[1 PRs](https://github.com/WyriHaximus/reactphp-filesystem-s3/pulls)PHPCI failing

Since Sep 4Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/reactphp-filesystem-s3)[ Packagist](https://packagist.org/packages/wyrihaximus/react-filesystem-s3)[ RSS](/packages/wyrihaximus-react-filesystem-s3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

ReactPHP S3 Filesystem Adapter
==============================

[](#reactphp-s3-filesystem-adapter)

[![Build Status](https://camo.githubusercontent.com/387adcb8cb799fbe39c5ded43a574df7428fd2fe8e911a1a97a05ab174683b25/68747470733a2f2f7472617669732d63692e6f72672f57797269486178696d75732f72656163747068702d66696c6573797374656d2d73332e706e67)](https://travis-ci.org/WyriHaximus/reactphp-filesystem-s3)[![Latest Stable Version](https://camo.githubusercontent.com/6deb931a3dd1de3a4a18c74e0642b677607716284b0c4e76a1f77a6cff048d38/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d66696c6573797374656d2d73332f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/react-filesystem-s3)[![Total Downloads](https://camo.githubusercontent.com/87d7629778074d84c0c5119cae498fd2904638fe429f660d28e78a85172b0c79/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d66696c6573797374656d2d73332f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/react-filesystem-s3)[![License](https://camo.githubusercontent.com/35711e929ca41c0b58ee634df13ae61859468863dbc3595d50757531f86f7024/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f72656163742d66696c6573797374656d2d73332f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/react-filesystem-s3)

AWS S3 adapter for [react/filesystem](https://github.com/reactphp/filesystem)

### Installation

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.

```
composer require wyrihaximus/react-filesystem-s3

```

### How to use

[](#how-to-use)

Before we start using the adapter we need to set it up, it requires an event loop and an options array which is passed directly into a new `Aws\Sdk` object. The `Aws\Sdk` object creates a new S3 client based on those options. (If none provided the adapter will create a new handler stack. This behavior can be overwritten by specifying one in `$options['http_handler']`.)

```
$loop = Factory::create(); // The required event loop
$adapter = new S3Adapter(
    $loop,
    [
        'credentials' => [ // The credentials to use with this adapter
            'key' => 'KEY',
            'secret' => 'SECRET',
        ],
        'region' => 'REGION', // THe region your bucket resides
        'version' => 'latest',
    ],
    'BUCKET' // Your buckets name
);
```

Next all you have to do is create a new `Filesystem` instance with the new adapter:

```
$filesystem = Filesystem::createFromAdapter($adapter);
```

This filesystem can then be used to, for example, list the contents in the root of your S3 bucket:

```
$filesystem->dir('')->ls()->then(function (\SplObjectStorage $ls) {
    foreach ($ls as $node) {
        echo $node->getPath(), PHP_EOL;
    }
    echo 'Found ', $ls->count(), ' nodes', PHP_EOL;
}, function ($e) {
    echo $e->getMessage(), PHP_EOL;
});
```

See the [examples](https://github.com/WyriHaximus/reactphp-filesystem-s3/tree/master/examples) directory for complete examples.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

Copyright 2015 [Cees-Jan Kiewiet](http://wyrihaximus.net/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance43

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (30 commits)")

---

Tags

hacktoberfestphpreactphp

### Embed Badge

![Health badge](/badges/wyrihaximus-react-filesystem-s3/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-react-filesystem-s3/health.svg)](https://phpackages.com/packages/wyrihaximus-react-filesystem-s3)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
