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

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

kcs/filesystem
==============

Filesystem abstraction library

v0.1.1(2y ago)15.0k↓71.2%MITPHPPHP ^8.1CI passing

Since Oct 4Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/alekitto/filesystem)[ Packagist](https://packagist.org/packages/kcs/filesystem)[ RSS](/packages/kcs-filesystem/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (14)Versions (3)Used By (0)

KCS Filesystem
==============

[](#kcs-filesystem)

Filesystem abstraction library with local, Async S3, and Google Cloud Storage adapters, plus a PHP stream wrapper and Symfony bundle integration.

Installation
------------

[](#installation)

```
composer require kcs/filesystem
```

Basic usage
-----------

[](#basic-usage)

### Local filesystem

[](#local-filesystem)

```
use Kcs\Filesystem\Local\LocalFilesystem;

$fs = new LocalFilesystem('/var/app/storage');
$fs->write('hello.txt', 'Hello!');
$contents = $fs->read('hello.txt')->read(1024);
```

### Async S3

[](#async-s3)

```
use AsyncAws\S3\S3Client;
use Kcs\Filesystem\AsyncS3\AsyncS3Filesystem;

$client = new S3Client([
    'region' => 'eu-west-1',
    'accessKeyId' => '...',
    'accessKeySecret' => '...',
]);

$fs = new AsyncS3Filesystem('my-bucket', '/', $client);
$fs->write('path/file.txt', 'content');
```

### Google Cloud Storage

[](#google-cloud-storage)

```
use Google\Cloud\Storage\StorageClient;
use Kcs\Filesystem\GCS\GCSFilesystem;

$client = new StorageClient([
    'projectId' => 'my-project',
    'keyFilePath' => '/path/to/credentials.json',
]);

$fs = new GCSFilesystem('my-bucket', '/', $client);
$fs->write('path/file.txt', 'content');
```

Symfony bundle configuration
----------------------------

[](#symfony-bundle-configuration)

```
# config/packages/filesystem.yaml
filesystem:
  storages:
    local_storage:
      type: local
      stream_wrapper_protocol: localfs
      options:
        path: '%kernel.project_dir%/var/storage'

    s3_storage:
      type: s3
      options:
        bucket: '%env(S3_BUCKET)%'
        region: '%env(S3_REGION)%'
        access_key: '%env(S3_ACCESS_KEY)%'
        secret_key: '%env(S3_SECRET_KEY)%'
        prefix: 'app'

    gcs_storage:
      type: gcs
      options:
        bucket: '%env(GCS_BUCKET)%'
        project_id: '%env(GCS_PROJECT_ID)%'
        key_file_path: '%env(resolve:GCS_KEY_FILE)%'
        prefix: 'app'
```

### GCS options

[](#gcs-options)

- `bucket` (required)
- `prefix` (optional, default `/`)
- `project_id` (optional)
- `key_file_path` (optional)
- `api_endpoint` (optional)
- `client` (optional, service id)

Stream wrapper
--------------

[](#stream-wrapper)

Enable a `stream_wrapper_protocol` to register a PHP stream wrapper for a storage. For example `localfs://path/to/file.txt`.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance51

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~196 days

Total

2

Last Release

806d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73dd7f3bebd03ec946b6b12359141ea461b770c3671acac4e8004e3c2d78e78f?d=identicon)[alekitto](/maintainers/alekitto)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[vich/uploader-bundle

Ease file uploads attached to entities

1.9k27.6M143](/packages/vich-uploader-bundle)[symfony/mailer

Helps sending emails

1.6k409.1M1.4k](/packages/symfony-mailer)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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