PHPackages                             amekusa/phio - 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. amekusa/phio

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

amekusa/phio
============

Object-oriented filesystem library for PHP

0.2.0(9y ago)026MITPHPPHP &gt;=5.3.5

Since Aug 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/amekusa/PhiO)[ Packagist](https://packagist.org/packages/amekusa/phio)[ Docs](http://amekusa.github.io/phio)[ RSS](/packages/amekusa-phio/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

[PhiO](https://amekusa.github.io/PhiO/): Object-oriented filesystem library for PHP
===================================================================================

[](#phio-object-oriented-filesystem-library-for-php)

- Consistent &amp; clear API
- Encapsulates bothersome
- Less typing, but also readable
- Well tested &amp; documented
    [📘 See the complete documentation](https://amekusa.github.io/PhiO/)

Install
-------

[](#install)

Install via Composer.

```
composer require amekusa/phio
```

Examples
--------

[](#examples)

Assumed directory structure:

```
/
└── srv
    └── http
        ├── favicon.svg
        ├── index.html
        ├── script.js
        └── style.css
```

### Iterate over files in a directory

[](#iterate-over-files-in-a-directory)

```
use amekusa\phio\Directory;

$dir = new Directory('/srv/http');
foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}
```

This code results:

```
/srv/http/favicon.svg
/srv/http/index.html
/srv/http/script.js
/srv/http/style.css

```

### Filter files

[](#filter-files)

```
use amekusa\phio\Directory;
use amekusa\phio\Filter;

$dir = new Directory('/srv/http');
$dir->addFilter(new Filter('s*.*s'));

foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}
```

This code results:

```
/srv/http/script.js
/srv/http/style.css

```

You can also use regular expression like this:

```
use amekusa\phio\Directory;
use amekusa\phio\RegexFilter;

$dir = new Directory('/srv/http');
$dir->addFilter(new RegexFilter('/\.[a-z]{3}$/'));

foreach ($dir as $file) {
	echo $file->getPath() . "\n";
}
```

This code results:

```
/srv/http/favicon.svg
/srv/http/style.css

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

2

Last Release

3542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8fb246bd6b6e9810301af7f92fff49bd010b6bb70ac9127597cb8ebe304750a?d=identicon)[amekusa](/maintainers/amekusa)

---

Tags

filesystemOOPfs

### Embed Badge

![Health badge](/badges/amekusa-phio/health.svg)

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

###  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)[adlawson/vfs

Virtual file system

300433.0k21](/packages/adlawson-vfs)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

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

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)

PHPackages © 2026

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