PHPackages                             yzh52521/webman-filesystem - 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. yzh52521/webman-filesystem

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

yzh52521/webman-filesystem
==========================

Flysystem V2 adapter for the webman

0.6(4y ago)345MITPHPPHP &gt;=7.2

Since Nov 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/yzh52521/webman-filesystem)[ Packagist](https://packagist.org/packages/yzh52521/webman-filesystem)[ RSS](/packages/yzh52521-webman-filesystem/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (7)Used By (0)

\#推荐使用插件

安装
==

[](#安装)

```
composer require yzh52521/webman-filesystem

```

在config目录下新建filesystem.php并将下列内容导入

```
return [
    'default' => 'local',
    'storage' => [
        'local' => [
            'driver' => \yzh52521\Filesystem\Adapter\LocalAdapter::class,
            'root' => public_path(),
        ],

        'memory' => [
            'driver' => \yzh52521\Filesystem\Adapter\MemoryAdapter::class,
        ],
        's3' => [
            'driver' => \yzh52521\Filesystem\Adapter\S3Adapter::class,
            'credentials' => [
                'key' => 'S3_KEY',
                'secret' => 'S3_SECRET',
            ],
            'region' => 'S3_REGION',
            'version' => 'latest',
            'bucket_endpoint' => false,
            'use_path_style_endpoint' => false,
            'endpoint' => 'S3_ENDPOINT',
            'bucket_name' => 'S3_BUCKET',
        ],

        'oss' => [
            'driver' => \yzh52521\Filesystem\Adapter\AliyunAdapter::class,
            'accessId' => 'OSS_ACCESS_ID',
            'accessSecret' => 'OSS_ACCESS_SECRET',
            'bucket' => 'OSS_BUCKET',
            'endpoint' => 'OSS_ENDPOINT',
            // 'timeout' => 3600,
            // 'connectTimeout' => 10,
            // 'isCName' => false,
            // 'token' => null,
            // 'proxy' => null,
        ],
        'qiniu' => [
            'driver' => \yzh52521\Filesystem\Adapter\QiniuAdapter::class,
            'accessKey' => 'QINIU_ACCESS_KEY',
            'secretKey' => 'QINIU_SECRET_KEY',
            'bucket' => 'QINIU_BUCKET',
            'domain' => 'QINBIU_DOMAIN',
        ],
        'cos' => [
            'driver' => \yzh52521\Filesystem\Adapter\CosAdapter::class,
            'region' => 'COS_REGION',
            'app_id' => 'COS_APPID',
            'secret_id' => 'COS_SECRET_ID',
            'secret_key' => 'COS_SECRET_KEY',
            // 可选，如果 bucket 为私有访问请打开此项
            // 'signed_url' => false,
            'bucket' => 'COS_BUCKET',
            'read_from_cdn' => false,
            // 'timeout' => 60,
            // 'connect_timeout' => 60,
            // 'cdn' => '',
            // 'scheme' => 'https',
        ],
        'obs'    => [
            'driver'     => \yzh52521\Filesystem\Adapter\ObsAdapter::class,
            'key'        => 'OBS_ACCESS_ID',
            //
            'secret'     => 'OBS_ACCESS_KEY',
            //
            'bucket'     => 'OBS_BUCKET',
            //
            'endpoint'   => 'OBS_ENDPOINT',
            //  OBS 外网节点或自定义外部域名
            'cdn_domain' => 'OBS_CDN_DOMAIN',
            // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url，如果cdnDomain未设置，则使用endpoint来生成url，否则使用cdn
            'ssl_verify' => 'OBS_SSL_VERIFY',
            //  true to use 'https://' and false to use 'http://'. default is false,
            'debug'      => 'APP_DEBUG',
            //
        ],
    ],
];

```

- 阿里云 OSS 适配器

```
composer require "yzh52521/flysystem-oss:^2.0"

```

- S3 适配器

```
composer require "league/flysystem-aws-s3-v3:^2.0"

```

- 七牛云适配器

```
composer require "overtrue/flysystem-qiniu:^2.0"

```

- 内存适配器

```
composer require "league/flysystem-memory:^2.0"

```

- 腾讯云 COS 适配器

```
composer require "overtrue/flysystem-cos:^4.0"

```

- 华为云 OBS 适配器

```
composer require "yzh52521/flysystem-obs:^2.0"

```

使用
==

[](#使用)

通过Filesystem::storage('local') 来调用不同的适配器

```
    use yzh52521\Filesystem\Filesystem;
    public function upload(Request $request)
    {
        $file = $request->file('file');
        $stream = fopen($file->getRealPath(), 'r+');
        $path='uploads/'.$file->getUploadName();
        Filesystem::writeStream(
            $path,
            $stream
        );
        fclose($stream);
        return Filesystem::getStorageConfig('local','url').$path;

        // Write Files
        $filesystem->write('path/to/file.txt', 'contents');
        // Add local file
        $stream = fopen('local/path/to/file.txt', 'r+');
        $result = $filesystem->writeStream('path/to/file.txt', $stream);
        if (is_resource($stream)) {
            fclose($stream);
        }
        // Update Files
        $filesystem->update('path/to/file.txt', 'new contents');
        // Check if a file exists
        $exists = $filesystem->has('path/to/file.txt');
        // Read Files
        $contents = $filesystem->read('path/to/file.txt');
        // Delete Files
        $filesystem->delete('path/to/file.txt');
        // Rename Files
        $filesystem->rename('filename.txt', 'newname.txt');
        // Copy Files
        $filesystem->copy('filename.txt', 'duplicate.txt');
        // list the contents
        $filesystem->listContents('path', false);
    }

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

1646d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/052aa4acd90ad5d672ae5abe8d27d1f576f9c07e1967e2f6bced03b84079310f?d=identicon)[yuanzhihai](/maintainers/yuanzhihai)

---

Top Contributors

[![yuanzhihai](https://avatars.githubusercontent.com/u/15060466?v=4)](https://github.com/yuanzhihai "yuanzhihai (20 commits)")

---

Tags

ftpfilesystems3qiniuosscoswebman

### Embed Badge

![Health badge](/badges/yzh52521-webman-filesystem/health.svg)

```
[![Health](https://phpackages.com/badges/yzh52521-webman-filesystem/health.svg)](https://phpackages.com/packages/yzh52521-webman-filesystem)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.1k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M787](/packages/league-flysystem-aws-s3-v3)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[shopwwi/webman-filesystem

Flysystem V2 adapter for the webman

2715.4k5](/packages/shopwwi-webman-filesystem)[innoge/laravel-rclone

A sleek PHP wrapper around rclone with Laravel-style fluent API syntax

174.1k](/packages/innoge-laravel-rclone)

PHPackages © 2026

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