PHPackages                             kiwilan/php-filelist - 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. kiwilan/php-filelist

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

kiwilan/php-filelist
====================

PHP package for recursive file listing, exportable in JSON format.

0.1.02(8mo ago)21.2k[1 PRs](https://github.com/kiwilan/php-filelist/pulls)MITPHPPHP ^8.1CI passing

Since May 30Pushed 8mo agoCompare

[ Source](https://github.com/kiwilan/php-filelist)[ Packagist](https://packagist.org/packages/kiwilan/php-filelist)[ Docs](https://github.com/kiwilan/php-filelist)[ GitHub Sponsors](https://github.com/kiwilan)[ RSS](/packages/kiwilan-php-filelist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

PHP FileList
============

[](#php-filelist)

[![Banner with rocks and PHP FileList title](https://raw.githubusercontent.com/kiwilan/php-filelist/main/docs/banner.jpg)](https://raw.githubusercontent.com/kiwilan/php-filelist/main/docs/banner.jpg)

[![php](https://camo.githubusercontent.com/2d44ab343cf5a2aab849b6954ee31dd09ba1f1f11bf0f168ccd08e186ec060b1/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666c6174266c6162656c3d504850266d6573736167653d76382e3126636f6c6f723d373737424234266c6f676f3d706870266c6f676f436f6c6f723d666666666666266c6162656c436f6c6f723d313831383162)](https://www.php.net/)[![version](https://camo.githubusercontent.com/3f9e96b748a74a2004b84b37d68cb8becc9ee85cbd276d7906143bf7ee9a1ad2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6977696c616e2f7068702d66696c656c6973742e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-filelist)[![downloads](https://camo.githubusercontent.com/2ee83b795b9beba48a851d1078a1087c017dc81d4e86d9620a36bc22ba3bcb45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6977696c616e2f7068702d66696c656c6973742e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-filelist)[![license](https://camo.githubusercontent.com/e98e9bf00fea20823801f3c526cddc5c2eca34a82db55195695c26d354162b3a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6977696c616e2f7068702d66696c656c6973742e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://github.com/kiwilan/php-filelist/blob/main/README.md)[![tests](https://camo.githubusercontent.com/01f6b445823d8b9e4f87a4fea8a4f4d760026b7e503ef18779825f328ca48880/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6977696c616e2f7068702d66696c656c6973742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c617426636f6c6f72413d313831383142)](https://packagist.org/packages/kiwilan/php-filelist)[![codecov](https://camo.githubusercontent.com/e906d922ba3d09a5d95f9768a6b28d831a645d04b8d4b7cdf06507cbdb3fb2b8/68747470733a2f2f636f6465636f762e696f2f67682f6b6977696c616e2f7068702d66696c656c6973742f67726170682f62616467652e7376673f746f6b656e3d4c685733384331564b5a)](https://codecov.io/gh/kiwilan/php-filelist)

PHP package for recursive file listing, exportable in JSON format.

Note

The aim of this package is to provide a simple way to list files in a directory, with options to customize the scan. But the real feature is usage of custom binaries, if you want to add an interesting binary, you can open an issue or a pull request.

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

[](#installation)

You can install the package via composer:

```
composer require kiwilan/php-filelist
```

Usage
-----

[](#usage)

```
$list = FileList::make('/path/to/scan')->run();

$list->getFiles(); // List of files as `string[]`
$list->getSplFiles(); // List of SplFileInfo as `SplFileInfo[]`
$list->getErrors(); // List of errors as `string[]|null`
$list->getTimeElapsed(); // Time elapsed in seconds as `float`
$list->getTotal(); // Total files as `int`
$list->isSuccess(); // Success status as `bool`
```

### Options

[](#options)

Show hidden files, default is `false`.

```
$list = FileList::make('/path/to/scan')->showHidden()->run();
```

Save as JSON.

```
$list = FileList::make('/path/to/scan')->saveAsJson('/path/to/json')->run();
```

Throw exception on error, otherwise errors are stored in the list.

```
$list = FileList::make('/path/to/scan')->throwOnError()->run();
```

Limit the number of files to scan.

```
$list = FileList::make('/path/to/scan')->limit(100)->run();
```

Get only files with specific extensions, case insensitive.

```
$list = FileList::make('/path/to/scan')->onlyExtensions(['txt', 'md'])->run();
```

Skip extensions, case insensitive.

```
$list = FileList::make('/path/to/scan')->skipExtensions(['txt', 'md'])->run();
```

Skip filenames.

```
$list = FileList::make('/path/to/scan')->skipFilenames(['file.txt', 'README.md'])->run();
```

Disable recursive scan.

```
$list = FileList::make('/path/to/scan')->notRecursive()->run();
```

Disable PHP memory limit.

```
$list = FileList::make('/path/to/scan')->noMemoryLimit()->run();
```

### Use custom binaries

[](#use-custom-binaries)

If you want to add a new binary, you can open an issue or a pull request.

#### `find`

[](#find)

The `find` binary is used to list files in a directory, you can add path of binary as parameter of `withFind()` method if it's not in your PATH.

```
$list = FileList::make('/path/to/scan')->withFind()->run();
```

#### `scout-seeker`

[](#scout-seeker)

The `scout-seeker` binary is used to list files in a directory, you can add path of binary as parameter of `withScoutSeeker()` method if it's not in your PATH.

Important

You can install `scout-seeker` (v0.2.11 min) with [Cargo](https://www.rust-lang.org/) (Rust package manager):

```
cargo install scout-seeker
```

Binary `scout-seeker` is a Rust CLI tool built to list files, you can find the source code [here](https://github.com/ewilan-riviere/scout-seeker).

```
$list = FileList::make('/path/to/scan')->withScoutSeeker()->run();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Ewilan Rivière](https://github.com/kiwilan)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[![](https://user-images.githubusercontent.com/48261459/201463225-0a5a084e-df15-4b11-b1d2-40fafd3555cf.svg)](https://github.com/kiwilan)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance59

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.8% 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

Every ~65 days

Recently: every ~112 days

Total

8

Last Release

258d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58eb34eac9af07c3352e83060e472e1c280838ebe0568692561c00a2cfde9e57?d=identicon)[ewilan-riviere](/maintainers/ewilan-riviere)

---

Top Contributors

[![ewilan-riviere](https://avatars.githubusercontent.com/u/48261459?v=4)](https://github.com/ewilan-riviere "ewilan-riviere (89 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

filesystemphpphpfilekiwilan

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kiwilan-php-filelist/health.svg)

```
[![Health](https://phpackages.com/badges/kiwilan-php-filelist/health.svg)](https://phpackages.com/packages/kiwilan-php-filelist)
```

###  Alternatives

[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)[davaxi/vcalendar

PHP Class to generate VCalendar (ics) file

1180.8k](/packages/davaxi-vcalendar)

PHPackages © 2026

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