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

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

corex/filesystem
================

Filesystem (directory, file, ...)

2.0.3(6y ago)02792MITPHPPHP ^7.2

Since May 26Pushed 2y agoCompare

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

READMEChangelogDependencies (2)Versions (12)Used By (2)

Filesystem (directory, file, cache, ...)
========================================

[](#filesystem-directory-file-cache-)

[![License](https://camo.githubusercontent.com/ecd1a7ce2673caf1594b9c78970b858144385e5d49c791881c7609817466f43b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f7265782f66696c6573797374656d2e737667)](https://camo.githubusercontent.com/ecd1a7ce2673caf1594b9c78970b858144385e5d49c791881c7609817466f43b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f7265782f66696c6573797374656d2e737667)[![Build Status](https://camo.githubusercontent.com/f47300b39c82dd7fdd36e7672b4d131eeb9a84516f346bcea8100f1400f9aedf/68747470733a2f2f7472617669732d63692e6f72672f636f7265782f66696c6573797374656d2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/f47300b39c82dd7fdd36e7672b4d131eeb9a84516f346bcea8100f1400f9aedf/68747470733a2f2f7472617669732d63692e6f72672f636f7265782f66696c6573797374656d2e7376673f6272616e63683d6d6173746572)[![codecov](https://camo.githubusercontent.com/93b3694bcef951dabae4994b502bdd1a0a598b4a29346afe1c5c6f79dbb036f9/68747470733a2f2f636f6465636f762e696f2f67682f636f7265782f66696c6573797374656d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://camo.githubusercontent.com/93b3694bcef951dabae4994b502bdd1a0a598b4a29346afe1c5c6f79dbb036f9/68747470733a2f2f636f6465636f762e696f2f67682f636f7265782f66696c6573797374656d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)

### Cache

[](#cache)

Simple cache implementation.

A few examples.

```
// Generate key based on string + array.
$key = Cache::key('test', ['param1' => 'Something']);

// Set path for cache stores.
Cache::path('/path/cache/stores');

// Set lifetime for cache in seconds.
Cache::lifetime(600);

// Set lifetime for cache in minutes.
Cache::lifetime('60m');

// Set lifetime for cache in hours.
Cache::lifetime('1h');

// Get from cache from 'custom-store'.
$data = Cache::get('test', 'default.value', 'custom-store');

// Put data in cache to 'custom-store'.
Cache::put('test', 'data', 'custom-store');

// Flush cache 'custom-store'.
Cache::flush('custom-store');
```

### Directory

[](#directory)

Various directory helpers.

A few examples.

```
// Test if directory exists.
$exist = Directory::exist('/my/path');

// Check if directory is writeable.
$isWriteable = Directory::isWritable('/my/path');

// Make directory.
Directory::make('/my/path');

// Get entries of a directory.
$entries = Directory::entries('/my/path', '*', true, true, true);
```

### File

[](#file)

Various file helpers (i.e. stub, json, etc.)

A few examples.

```
// Check if file exists.
$exist = File::exist($filename);

// Get from file.
$content = File::get($filename);

// Load lines.
$lines = File::getLines($filename);

// Save content.
File::put($filename, $content);

// Save lines.
File::putLines($filename, $lines);

// Get stub.
$stub = File::getStub($filename, [
    'firstname' => 'Roger',
    'lastname' => 'Moore'
]);

// Get template.
$template = File::getTemplate($filename, [
    'firstname' => 'Roger',
    'lastname' => 'Moore'
]);

// Get json.
$array = File::getJson($filename);

// Put json.
File::putJson($filename, $array);

// Get temp filename.
$filename = File::getTempFilename();

// Delete file.
File::delete($filename);
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~42 days

Recently: every ~77 days

Total

10

Last Release

2526d ago

Major Versions

1.2.1 → 2.0.02018-12-09

PHP version history (2 changes)1.0.0PHP &gt;=7.0

2.0.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2168107cb28f49e937f963a925553ebac5923aa27cad2e1cf90ddbcabf663d6d?d=identicon)[corex](/maintainers/corex)

---

Top Contributors

[![corex](https://avatars.githubusercontent.com/u/21259173?v=4)](https://github.com/corex "corex (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
