PHPackages                             brainexploded/fstools - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. brainexploded/fstools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

brainexploded/fstools
=====================

018PHP

Since Dec 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/brainexploded/fstools)[ Packagist](https://packagist.org/packages/brainexploded/fstools)[ RSS](/packages/brainexploded-fstools/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Tools for work with filesystem
==============================

[](#tools-for-work-with-filesystem)

FSTraverser
-----------

[](#fstraverser)

It is the class for recursive traverse your directories and apply callback to each found file.

Usage example:

```
$tr = new FSTraverser(
    // root dir
    '/home/user/lol',
    // callback
    function($path, $entry) {
        echo $entry, PHP_EOL;
    }
);
$tr->setExcludeExtensions(['php', 'js']);

$tr->go();
```

In this example, we print all files, that are not php or js.

Or:

```
$tr = new FSTraverser(
    // root dir
    '/home/user/lol',
    // callback
    function($path, $entry) {
        echo $entry, PHP_EOL;
    },
    // exclude nodes
    ['.git', 'README.md'],
    // exclude extensions (have no point in this case, because allowed extensions are setted)
    ['zip', 'gz'],
    // allowed extensions (process only files with this extension)
    ['js', 'twig'],
    // maximal depth
    5
);

$tr->go();
```

In this example, we traverse `lol` directory, avoiding `.git` dir and `README.md`file, process only js and twig files, and not traverse all nodes, deeper than 5 level.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![zxbass](https://avatars.githubusercontent.com/u/2195580?v=4)](https://github.com/zxbass "zxbass (14 commits)")

### Embed Badge

![Health badge](/badges/brainexploded-fstools/health.svg)

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

###  Alternatives

[crodas/text-rank

Extract relevant keywords from a given text

10458.6k1](/packages/crodas-text-rank)[kunststube/rison

A PHP encoder and decoder for Rison, the compact JSON-like data format optimized for URIs.

2464.5k3](/packages/kunststube-rison)[evoweb/extender

Extending extbase domain models like a pro with extender

11260.3k6](/packages/evoweb-extender)

PHPackages © 2026

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