PHPackages                             zero-to-prod/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. zero-to-prod/filesystem

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

zero-to-prod/filesystem
=======================

Helpers for interacting with a filesystem.

v0.2.0(1y ago)11.1k1MITPHPPHP &gt;=7.1CI passing

Since Feb 16Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/filesystem)[ Packagist](https://packagist.org/packages/zero-to-prod/filesystem)[ Docs](https://github.com/zero-to-prod/filesystem)[ Fund](https://github.com/sponsors/zero-to-prod)[ RSS](/packages/zero-to-prod-filesystem/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (1)

Zerotoprod\\Filesystem
======================

[](#zerotoprodfilesystem)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/filesystem)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/5097687b8421379a2c5cdd2daf1cbee3973e9cc28d7cfa26d678581c826430dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f66696c6573797374656d2f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/filesystem/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/ee55808bc3266783c64a3b462326a1a71fcca586f818a99682332640fd4ce413/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f66696c6573797374656d2f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/filesystem/actions)[![Packagist Downloads](https://camo.githubusercontent.com/4e47077f2c37ff76efb50551d9a0e07c2d7237667977f6a4419e6bc39303f941/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f66696c6573797374656d3f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/filesystem/stats)[![php](https://camo.githubusercontent.com/533496cfd230f2a8f8bed461f7b8e269e6fbf8dfb7f8e1a80e26e0f11545dcf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d746f2d70726f642f66696c6573797374656d2e7376673f636f6c6f723d707572706c65)](https://packagist.org/packages/zero-to-prod/filesystem/stats)[![Packagist Version](https://camo.githubusercontent.com/b743fb93043dd637a6b061bf60b16a75a7bfb8f3a5392316db96346cd94a385a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f66696c6573797374656d3f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/filesystem)[![License](https://camo.githubusercontent.com/a42dad2f4ce724878a52f261a2dd0d02c07c7b73373d287be536cd0a708e5e30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f66696c6573797374656d3f636f6c6f723d70696e6b)](https://github.com/zero-to-prod/filesystem/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/556df6a1d0d33b4afadd15c0fcc305ca1be3bd24bb814341e6243a86e495b714/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f66696c6573797374656d2e737667)](https://wakatime.com/badge/github/zero-to-prod/filesystem)[![Hits-of-Code](https://camo.githubusercontent.com/e40ccfd3aeeef8882811351038f6eb758f45f5bd7d3238f0833dec45e78118ad/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f66696c6573797374656d3f6272616e63683d6d61696e)](https://hitsofcode.com/github/zero-to-prod/filesystem/view?branch=main)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Usage](#usage)
    - [getFilesByExtension()](#getFilesByExtension)
    - [getFilesByExtensionRecursive()](#getFilesByExtensionRecursive)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

Helpers for interacting with a filesystem.

Requirements
------------

[](#requirements)

- PHP 7.1 or higher.

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

[](#installation)

Install `Zerotoprod\Filesystem` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/filesystem
```

This will add the package to your project's dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/filesystem)
vendor/bin/zero-to-prod-filesystem

# Publish to custom directory
vendor/bin/zero-to-prod-filesystem /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
    "scripts": {
        "post-install-cmd": [
            "zero-to-prod-filesystem"
        ],
        "post-update-cmd": [
            "zero-to-prod-filesystem"
        ]
    }
}
```

Usage
-----

[](#usage)

### getFilesByExtension()

[](#getfilesbyextension)

Return all files by extension in a directory.

```
use Zerotoprod\Filesystem\Filesystem;

$files = Filesystem::getFilesByExtension('dir', 'php')
```

### getFilesByExtensionRecursive()

[](#getfilesbyextensionrecursive)

Return all files by extension in a directory recursively.

```
use Zerotoprod\Filesystem\Filesystem;

$files = Filesystem::getFilesByExtensionRecursive('dir', 'php')
```

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/filesystem/issues) page if you want to contribute.

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance45

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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

3

Last Release

548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (3 commits)")

---

Tags

filesystemzero-to-prod

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-filesystem/health.svg)

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k694.3M2.7k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k293.8M1.2k](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k42.1M138](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72430.5M109](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

228280.2M110](/packages/league-flysystem-local)[oneup/flysystem-bundle

Integrates Flysystem filesystem abstraction library to your Symfony project.

64224.1M86](/packages/oneup-flysystem-bundle)

PHPackages © 2026

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