PHPackages                             cakephp/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. [Framework](/categories/framework)
4. /
5. cakephp/filesystem

ActiveLibrary[Framework](/categories/framework)

cakephp/filesystem
==================

CakePHP filesystem convenience classes to help you work with files and folders.

4.6.3(2y ago)19179.1k↑56.7%9MITPHPPHP &gt;=7.4.0

Since May 16Pushed 1mo ago26 watchersCompare

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

READMEChangelogDependencies (1)Versions (283)Used By (9)

[![Total Downloads](https://camo.githubusercontent.com/a0879e713197a2d7e3a527e074c57f41075d23a17809f3a57f54744cb01e7894/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616b657068702f66696c6573797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cakephp/filesystem)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)

This package has been deprecated.
=================================

[](#this-package-has-been-deprecated)

CakePHP Filesystem Library
--------------------------

[](#cakephp-filesystem-library)

The Folder and File utilities are convenience classes to help you read from and write/append to files; list files within a folder and other common directory related tasks.

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

[](#basic-usage)

Create a folder instance and search for all the `.php` files within it:

```
use Cake\Filesystem\Folder;

$dir = new Folder('/path/to/folder');
$files = $dir->find('.*\.php');
```

Now you can loop through the files and read from or write/append to the contents or simply delete the file:

```
foreach ($files as $file) {
    $file = new File($dir->pwd() . DIRECTORY_SEPARATOR . $file);
    $contents = $file->read();
    // $file->write('I am overwriting the contents of this file');
    // $file->append('I am adding to the bottom of this file.');
    // $file->delete(); // I am deleting this file
    $file->close(); // Be sure to close the file when you're done
}
```

Documentation
-------------

[](#documentation)

Please make sure you check the [official documentation](https://book.cakephp.org/4/en/core-libraries/file-folder.html)

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance58

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community33

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~0 days

Total

280

Last Release

1024d ago

Major Versions

3.8.8 → 4.0.12019-11-20

3.8.12 → 4.0.32020-01-18

3.9.3 → 4.1.72020-10-19

3.9.7 → 4.2.0-beta12020-11-01

3.10.4 → 4.2.112021-05-20

PHP version history (4 changes)3.5.1PHP &gt;=5.6.0

4.0.0-beta1PHP &gt;=7.2.0

3.9.8PHP &gt;=5.6.0,&lt;8.0.0

4.4.0-RC1PHP &gt;=7.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23666?v=4)[CakePHP](/maintainers/cakephp)[@cakephp](https://github.com/cakephp)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (73 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (62 commits)")[![othercorey](https://avatars.githubusercontent.com/u/24221186?v=4)](https://github.com/othercorey "othercorey (24 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (22 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (13 commits)")[![saeideng](https://avatars.githubusercontent.com/u/8215801?v=4)](https://github.com/saeideng "saeideng (8 commits)")[![alpri49](https://avatars.githubusercontent.com/u/9262728?v=4)](https://github.com/alpri49 "alpri49 (7 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (4 commits)")[![ndm2](https://avatars.githubusercontent.com/u/5031606?v=4)](https://github.com/ndm2 "ndm2 (3 commits)")[![Theaxiom](https://avatars.githubusercontent.com/u/57013?v=4)](https://github.com/Theaxiom "Theaxiom (3 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (2 commits)")[![antograssiot](https://avatars.githubusercontent.com/u/4977112?v=4)](https://github.com/antograssiot "antograssiot (2 commits)")[![burzum](https://avatars.githubusercontent.com/u/162789?v=4)](https://github.com/burzum "burzum (2 commits)")[![daniel-lang](https://avatars.githubusercontent.com/u/6500514?v=4)](https://github.com/daniel-lang "daniel-lang (2 commits)")[![frankfoerster](https://avatars.githubusercontent.com/u/3206331?v=4)](https://github.com/frankfoerster "frankfoerster (2 commits)")[![stickler-ci](https://avatars.githubusercontent.com/u/16011037?v=4)](https://github.com/stickler-ci "stickler-ci (2 commits)")[![mtak3](https://avatars.githubusercontent.com/u/1726154?v=4)](https://github.com/mtak3 "mtak3 (1 commits)")[![kalessil](https://avatars.githubusercontent.com/u/1577185?v=4)](https://github.com/kalessil "kalessil (1 commits)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (1 commits)")[![PhantomWatson](https://avatars.githubusercontent.com/u/1965565?v=4)](https://github.com/PhantomWatson "PhantomWatson (1 commits)")

---

Tags

filesystemcakephpfilesfolders

### Embed Badge

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

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

###  Alternatives

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[cakephp/utility

CakePHP Utility classes such as Inflector, String, Hash, and Security

12127.1M63](/packages/cakephp-utility)[cakephp/database

Flexible and powerful Database abstraction library with a familiar PDO-like API

9824.6M33](/packages/cakephp-database)[cakephp/debug_kit

CakePHP Debug Kit

86514.0M138](/packages/cakephp-debug-kit)[cakephp/datasource

Provides connection managing and traits for Entities and Queries that can be reused for different datastores

4724.6M11](/packages/cakephp-datasource)[cakephp/cache

Easy to use Caching library with support for multiple caching backends

498.5M16](/packages/cakephp-cache)

PHPackages © 2026

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