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(3mo ago)4132.3k↓27%1[2 issues](https://github.com/Innmind/Filesystem/issues)20MITPHPPHP ~8.4CI passing

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 1mo ago

READMEChangelog (10)Dependencies (11)Versions (59)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

59

—

FairBetter than 99% of packages

Maintenance68

Regular maintenance activity

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity94

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

113d 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 (610 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

[league/flysystem

File storage abstraction for PHP

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

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72428.6M91](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40129.5M87](/packages/league-flysystem-bundle)

PHPackages © 2026

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