PHPackages                             exorcist-guo/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. exorcist-guo/filesystem

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

exorcist-guo/filesystem
=======================

Flysystem V2 adapter for the webman

v1.0.0(1y ago)08MITPHPPHP &gt;=8.0.2

Since May 9Pushed 1y agoCompare

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

READMEChangelogDependencies (7)Versions (2)Used By (0)

安装
==

[](#安装)

```
composer require yzh52521/filesystem

```

配置文件在 config/plugin/yzh52521/filesystem 下

```
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,
            '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,
            'access_id'     => 'OSS_ACCESS_ID',
            'access_secret' => 'OSS_ACCESS_SECRET',
            'bucket'        => 'OSS_BUCKET',
            'endpoint'      => 'OSS_ENDPOINT',
            'prefix'        => '',
            'isCName'       => false,
            'options'       => []
        ],
        'qiniu'  => [
            'driver'     => \yzh52521\Filesystem\Adapter\QiniuAdapter::class,
            'access_key' => 'QINIU_ACCESS_KEY',
            'secret_key' => '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',
            'prefix'        => '',
            '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',
            'prefix'          => '',
            'bucket_endpoint' => '',
            'temporary_url'   => '',
            //
        ],
    ],
];

```

- 阿里云 OSS 适配器

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

```

- S3 适配器

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

```

- 七牛云适配器

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

```

- 内存适配器

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

```

- 腾讯云 COS 适配器

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

```

- 华为云 OBS 适配器

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

```

使用
==

[](#使用)

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

使用
==

[](#使用-1)

```
 use yzh52521\Filesystem\Facade\Filesystem;
        public function upload(\support\Request $request){
            $file = $request->file('file');
            $result = Filesystem::putFile('webman',$file);
            //文件判断

            try {
                    validate(
                        [
                            'image' => [
                                // 限制文件大小(单位b)，这里限制为4M
                                'fileSize' => 4 * 1024 * 1000,
                                // 限制文件后缀，多个后缀以英文逗号分割
                                'fileExt'  => 'gif,jpg,png,jpeg'
                            ]
                        ]
                    )->check(['image' => $file]);
                $path = Filesystem::disk('local')->putFile('webman',$file);
             }catch (\yzh52521\validate\exception\ValidateException | \Exception $e){
                print($e->getMessage());
             }
            //获取上传文件
            $fileUrl = Filesystem::url($path);

            //指定选定器外网
            $fileUrl = Filesystem::disk('oss')->url($path);
         }

```

> 用例中使用了 validate 验证器

安装 validate

```
 composer require "yzh52521/webman-validate"

```

\###静态方法（可单独设定）

方法描述默认disk选定器config中配置的defaulturl获取文件访问地址putFile保存文件putFileAs指定文件名保存文件put保存文件

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance52

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

2

Last Release

365d ago

Major Versions

v1.0.0 → v2.x-dev2025-05-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/49942b4385d866cb162ab7c7cf9364ac11108abfc26f472cb0054619a65480fe?d=identicon)[exorcist-guo](/maintainers/exorcist-guo)

---

Top Contributors

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

---

Tags

ftpfilesystems3qiniuosscoswebman

### Embed Badge

![Health badge](/badges/exorcist-guo-filesystem/health.svg)

```
[![Health](https://phpackages.com/badges/exorcist-guo-filesystem/health.svg)](https://phpackages.com/packages/exorcist-guo-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.6M785](/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)
