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)13.8k↓39.7%MITPHPPHP ^8.1CI passing

Since Oct 4Pushed 3mo ago1 watchersCompare

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

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

35

—

LowBetter than 80% of packages

Maintenance55

Moderate activity, may be stable

Popularity25

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

761d 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

[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M116](/packages/vich-uploader-bundle)[ankitpokhrel/tus-php

A pure PHP server and client for the tus resumable upload protocol v1.0.0

1.5k7.3M22](/packages/ankitpokhrel-tus-php)[oneup/uploader-bundle

This Symfony bundle provides a server implementation for handling single and multiple file uploads using either FineUploader, jQuery File Uploader, YUI3 Uploader, Uploadify, FancyUpload, MooUpload, Plupload or Dropzone. Features include chunked uploads, orphanages, Gaufrette and Flysystem support.

6066.3M27](/packages/oneup-uploader-bundle)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[sonata-project/media-bundle

Symfony SonataMediaBundle

4625.5M71](/packages/sonata-project-media-bundle)[sylius/resource-bundle

Resource component for Sylius.

23410.2M173](/packages/sylius-resource-bundle)

PHPackages © 2026

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