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

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

methorz/filesystem
==================

MethorZ - Filesystem

1.0.0(1y ago)013proprietaryPHPPHP ^8.3

Since Nov 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/MethorZ/filesystem)[ Packagist](https://packagist.org/packages/methorz/filesystem)[ Docs](https://github.com/MethorZ/filesystem)[ RSS](/packages/methorz-filesystem/feed)WikiDiscussions main Synced 1mo ago

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

FileSystem Library
==================

[](#filesystem-library)

Overview
--------

[](#overview)

The FileSystem Library is a PHP package that provides a comprehensive representation of files and directories. It includes functionality for reading, scanning, copying, renaming, and removing files and directories, with support for recursive operations and filtering based on extensions, directories, and file names.

Features
--------

[](#features)

- **File and Directory Representation**: Classes to represent files and directories.
- **Recursive Operations**: Support for recursive scanning, copying, and removing of directories.
- **Filtering**: Ability to ignore specific file extensions, directories, and files during operations.
- **Unit Tests**: Comprehensive unit tests to ensure the functionality of the library.

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

[](#installation)

Install the package via Composer:

```
composer require methorz/filesystem
```

Usage
-----

[](#usage)

Reading a File or Directory

```
use MethorZ\FileSystem\FileSystem;
use MethorZ\FileSystem\Directory;
use MethorZ\FileSystem\File;

$path = '/path/to/your/file/or/directory';
$recursiveScan = true;
$extensions = ['txt', 'php'];

$fsObject = FileSystem::read($path, $recursiveScan, $extensions);

if ($fsObject instanceof Directory) {
    echo "It's a directory!";
} elseif ($fsObject instanceof File) {
    echo "It's a file!";
}
```

Copying Files and Directories

```
use MethorZ\FileSystem\FileSystem;

$source = '/path/to/source';
$destination = '/path/to/destination';

FileSystem::copy($source, $destination);
```

Ignoring Specific Files, Directories, and Extensions

```
use MethorZ\FileSystem\FileSystem;

FileSystem::ignoreExtensions(['log', 'tmp']);
FileSystem::ignoreDirectories(['cache', 'logs']);
FileSystem::ignoreFiles(['README.md', '.gitignore']);
```

Creating and Removing Directories

```
use MethorZ\FileSystem\FileSystem;

$path = '/path/to/new/directory';
FileSystem::createDirectory($path);

FileSystem::remove($path);
```

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

Author
------

[](#author)

MethorZ -

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

[](#contributing)

Contributions are welcome! Please open an issue or submit a pull request for any changes.

---

 This README provides an overview of the FileSystem Library, including installation instructions, usage examples, and information on running unit tests. For more detailed documentation, please refer to the source code and comments within the library.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

555d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

filesystemfiledirectorymethorz

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  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)[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)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)

PHPackages © 2026

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