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

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

futape/filesystem-utility
=========================

A library of filesystem utilities

1.2.0(6y ago)0111MITPHPPHP ~7.2.0CI failing

Since Dec 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/futape/filesystem-utility)[ Packagist](https://packagist.org/packages/futape/filesystem-utility)[ RSS](/packages/futape-filesystem-utility/feed)WikiDiscussions master Synced today

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

futape/filesystem-utility
=========================

[](#futapefilesystem-utility)

This library offers a set of utilities for working with the filesystem.

Utility functions are implemented as static functions in abstract classes, which are never expected to be instantiated.

Moreover this library offers a `FilteredDirectoryIterator` (see below).

Most functions accept path arguments, that are supported by `Paths::normalize()` and pass them through. The results of most functions are also processed by that function.

Install
-------

[](#install)

```
composer require futape/filesystem-utility
```

Usage
-----

[](#usage)

### Paths

[](#paths)

This utility class offers functions for working with paths.
Whenever possible the this utility is completely independent of the real underlying filesystem.

```
use Futape\Utility\Filesyste\Paths;

echo Paths::strip('/foo/bar/baz', '/foo'); // "./bar/baz"
```

### Files

[](#files)

A utility class for working with the filesystem.

```
use Futape\Utility\Filesyste\Files;

touch('./foo');
var_dump(Files::remove('./foo')); // true
```

### FilteredDirectoryIterator

[](#filtereddirectoryiterator)

An iterator that iterates over the contents of a directory, that match specified criteria.

```
use Futape\Utility\Filesyste\FilteredDirectoryIterator;

mkdir('./foo');
touch('./foo/bar');
symlink('./foo/bar', './foo/baz');
mkdir('./foo/bam');
var_dump(
    iterator_to_array(
        (new FilteredDirectoryIterator('./foo'))
            ->setDotFiles(false)
            ->setFileTypes(FilteredDirectoryIterator::FILE_TYPE_FILE | FilteredDirectoryIterator::FILE_TYPE_DIRECTORY)
    )
); // [DirectoryIterator("./foo/bar"), DirectoryIterator("./foo/bam")]
```

Testing
-------

[](#testing)

The library is tested by unit tests using PHP Unit.

To execute the tests, install the composer dependencies (including the dev-dependencies), switch into the `tests`directory and run the following command:

```
../vendor/bin/phpunit
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

2310d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2039b7c5a64766be0d130dbd8f7cfa4e3863c3c8b54eca6466c0974311fe6ccd?d=identicon)[futape](/maintainers/futape)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M124](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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