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

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

neutron/temporary-filesystem
============================

Symfony filesystem extension to handle temporary files

3.0.1(4y ago)12110.9M↓30.8%15[2 issues](https://github.com/romainneutron/Temporary-Filesystem/issues)[1 PRs](https://github.com/romainneutron/Temporary-Filesystem/pulls)20MITPHPPHP &gt;=5.6

Since Nov 2Pushed 4y ago2 watchersCompare

[ Source](https://github.com/romainneutron/Temporary-Filesystem)[ Packagist](https://packagist.org/packages/neutron/temporary-filesystem)[ RSS](/packages/neutron-temporary-filesystem/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (11)Used By (20)

TemporaryFilesystem
===================

[](#temporaryfilesystem)

TemporaryFilesystem propose an API for temprary filesystem based on [Symfony Filesystem Component](https://github.com/symfony/filesystem).

[![Build Status](https://camo.githubusercontent.com/aa7878f6765d3e08f36db5685c1d83a8dc99260b441166811b4ed7544546831b/68747470733a2f2f7472617669732d63692e6f72672f726f6d61696e6e657574726f6e2f54656d706f726172792d46696c6573797374656d2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/romainneutron/Temporary-Filesystem)

Usage
-----

[](#usage)

```
use Neutron\TemporaryFilesystem\TemporaryFilesystem;

$fs = TemporaryFilesystem::create();
```

API Examples :
--------------

[](#api-examples-)

### CreateTemporaryDirectory

[](#createtemporarydirectory)

CreateTemporaryDirectory creates a temporary directory with an optional mode :

```
$tempDir = $fs->createTemporaryDirectory($mode = 0755);
```

### CreateTemporaryFile

[](#createtemporaryfile)

CreateTemporaryFile creates an empty files in the temporary folder:

```
$fs->createTemporaryFile();

// return an empty temporary files with a "thumb-"
// prefix, '.dcm' as suffix and 'jpg' as extension
$fs->createTemporaryFile('thumb-', '.dcm', 'jpg');
```

### CreateTemporaryFiles

[](#createtemporaryfiles)

CreateTemporaryFiles creates a set of empty files in the temporary folder:

```
// return an array of 5 path to temporary files
$fs->createTemporaryFiles(5);

// return an array of 5 path to empty temporary files with a "thumb-"
// prefix, '.dcm' as suffix and 'jpg' as extension
$fs->createTemporaryFiles(20, 'thumb-', '.dcm', 'jpg');
```

This method is useful when dealing with libraries which encode images depending on the filename extension.

### CreateEmptyFile

[](#createemptyfile)

CreateEmptyFile creates an empty file in the specified folder:

```
// return a path to an empty file inside the current working directory
$fs->createEmptyFile(getcwd());

// return a path to an empty file in the "/home/romain" directory. The file
// has "original." as prefix, ".raw" as suffix and "CR2" as extension.
$fs->createEmptyFile("/home/romain", 'original.', '.raw', 'CR2');
```

This method is particularly useful when dealing with concurrent process writing in the same directory.

License
=======

[](#license)

Released under the MIT license

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity60

Solid adoption and visibility

Community30

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66% 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 ~369 days

Recently: every ~527 days

Total

10

Last Release

1638d ago

Major Versions

1.0.0 → 2.0.12013-04-09

2.4 → 3.02020-07-27

PHP version history (3 changes)2.2.0PHP ^5.3.9 || ^7.0

2.3.0PHP ^5.6 || ^7.0

3.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c264f69af4c60cb9cc98a522b4663f4b6a2708629cabc14409478ab6fc35348?d=identicon)[romain](/maintainers/romain)

---

Top Contributors

[![romainneutron](https://avatars.githubusercontent.com/u/137574?v=4)](https://github.com/romainneutron "romainneutron (31 commits)")[![jens1o](https://avatars.githubusercontent.com/u/11234139?v=4)](https://github.com/jens1o "jens1o (5 commits)")[![QuingKhaos](https://avatars.githubusercontent.com/u/993350?v=4)](https://github.com/QuingKhaos "QuingKhaos (5 commits)")[![cb8](https://avatars.githubusercontent.com/u/10119913?v=4)](https://github.com/cb8 "cb8 (3 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (2 commits)")[![javer](https://avatars.githubusercontent.com/u/591296?v=4)](https://github.com/javer "javer (1 commits)")

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k532.1M2.5k](/packages/aws-aws-sdk-php)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.0k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M370](/packages/easycorp-easyadmin-bundle)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[symfony/asset-mapper

Maps directories of assets &amp; makes them available in a public directory with versioned filenames.

1668.1M208](/packages/symfony-asset-mapper)

PHPackages © 2026

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