PHPackages                             sweikenb/lib-fs - 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. sweikenb/lib-fs

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

sweikenb/lib-fs
===============

Filesystem library

v1.0.0(3y ago)01.3k[1 PRs](https://github.com/sweikenb/lib-fs/pulls)MITPHPPHP ^8.1CI passing

Since Aug 13Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/sweikenb/lib-fs)[ Packagist](https://packagist.org/packages/sweikenb/lib-fs)[ RSS](/packages/sweikenb-lib-fs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Filesystem library
==================

[](#filesystem-library)

Add GIT commit hook
-------------------

[](#add-git-commit-hook)

Execute in project root:

```
rm -f "$(pwd)/.git/hooks/pre-commit"
ln -s "$(pwd)/bin/codequality" "$(pwd)/.git/hooks/pre-commit"
```

Basic Usage
-----------

[](#basic-usage)

Load the document tree into memory, modify if needed and persist at the end:

```
$service = new \Sweikenb\Library\Filesystem\Service\DirectoryTreeService();
$tree = $service->fetchTree('/my/directory/to/fetch');

foreach($tree->getChildDirs() as $dir) {
    foreach ($dir->getFiles() as $file) {
        // recursive function needed to traverse the tree
    }
}
foreach ($tree->getFiles() as $file) {
    $content = $file->getContent();
    // do some mods to the content ...
    $file->setContent($content);
}

$tree->persist();
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance53

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1372d ago

### Community

Maintainers

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

---

Top Contributors

[![sweikenb](https://avatars.githubusercontent.com/u/366399?v=4)](https://github.com/sweikenb "sweikenb (1 commits)")

### Embed Badge

![Health badge](/badges/sweikenb-lib-fs/health.svg)

```
[![Health](https://phpackages.com/badges/sweikenb-lib-fs/health.svg)](https://phpackages.com/packages/sweikenb-lib-fs)
```

###  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.8M125](/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)
