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

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

innmind/filesystem
==================

Filesystem abstraction layer

9.0.0(6mo ago)4140.1k↓51.8%1[3 issues](https://github.com/Innmind/Filesystem/issues)[1 PRs](https://github.com/Innmind/Filesystem/pulls)20MITPHPPHP ~8.4CI failing

Since Apr 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Innmind/Filesystem)[ Packagist](https://packagist.org/packages/innmind/filesystem)[ Docs](http://github.com/Innmind/filesystem)[ RSS](/packages/innmind-filesystem/feed)WikiDiscussions develop Synced 2w ago

READMEChangelog (10)Dependencies (11)Versions (60)Used By (20)

Filesystem
==========

[](#filesystem)

[![Build Status](https://github.com/Innmind/Filesystem/workflows/CI/badge.svg?branch=master)](https://github.com/Innmind/Filesystem/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/ec1c80db82d5b8cc40d66ddf75860e37b05b48f0988d5fa30f501a12a6ec7fbf/68747470733a2f2f636f6465636f762e696f2f67682f496e6e6d696e642f46696c6573797374656d2f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/Innmind/Filesystem)[![Type Coverage](https://camo.githubusercontent.com/c6433d47e7c1239124ce6f18fe3455e136d4a2b6d8c9955094bb5af865f94d0f/68747470733a2f2f73686570686572642e6465762f6769746875622f496e6e6d696e642f46696c6573797374656d2f636f7665726167652e737667)](https://shepherd.dev/github/Innmind/Filesystem)

Filesystem abstraction layer, the goal is to provide a model where you design how you put your files into directories without worrying where it will be persisted.

[Documentation](https://innmind.github.com/Filesystem/)

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

[](#installation)

```
composer install innmind/filesystem
```

Usage
-----

[](#usage)

The whole model is structured around files, directories, contents and adapters. [`File`](src/File.php), [`Directory`](src/Directory.php) and [`Content`](src/File/Content.php) are immutable objects.

Example:

```
use Innmind\Filesystem\{
    File,
    File\Content,
    Directory,
    Adapter,
};
use Innmind\Url\Path;

$directory = Directory::named('uploads')->add(
    File::named(
        $_FILES['my_upload']['name'],
        Content::ofString(\file_get_contents($_FILES['my_upload']['tmp_name'])),
    ),
);
$adapter = Adapter::mount(Path::of('/var/www/web/'))->unwrap();
$_ = $adapter
    ->add($directory)
    ->unwrap();
```

This example show you how you can create a new directory `uploads` in the folder `/var/www/web/` of your filesystem and create the uploaded file into it.

Note

For performance reasons the filesystem adapter only persist to disk the files that have changed (achievable via the immutable nature of file objects).

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance60

Regular maintenance activity

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity95

Battle-tested with a long release history

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

Recently: every ~167 days

Total

56

Last Release

204d ago

Major Versions

4.2.2 → 5.0.02022-01-30

5.2.0 → 6.0.02022-12-18

6.6.0 → 7.0.02023-10-21

7.6.0 → 8.0.02025-04-14

8.1.0 → 9.0.02026-01-25

PHP version history (7 changes)1.0.0PHP &gt;=7.0

2.0.0PHP ~7.1

4.0.0PHP ~7.4

4.2.0PHP ~7.4|~8.0

5.0.0PHP ~8.1

6.5.0PHP ~8.2

9.0.0PHP ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (614 commits)")

---

Tags

filesystem

### Embed Badge

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

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k382.4M3.7k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

568591.1k63](/packages/ecotone-ecotone)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.5M254](/packages/api-platform-metadata)[mimmi20/browser-detector

Library to detect Browsers and Devices

49158.4k5](/packages/mimmi20-browser-detector)

PHPackages © 2026

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