PHPackages                             ironedge/file-utils - 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. ironedge/file-utils

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

ironedge/file-utils
===================

File utilities.

0126PHP

Since Dec 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ironedgesoftware/file-utils)[ Packagist](https://packagist.org/packages/ironedge/file-utils)[ RSS](/packages/ironedge-file-utils/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

File Utils
==========

[](#file-utils)

[![Build Status](https://camo.githubusercontent.com/15f0f64234870f7d1a2ec8373dfcc2007df7be218af529546a4c70ddc4004b05/68747470733a2f2f7472617669732d63692e6f72672f69726f6e65646765736f6674776172652f66696c652d7574696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ironedgesoftware/file-utils)[![Dependency Status](https://camo.githubusercontent.com/7817c25fa0e134f5a19668c496710b56db652694bb430540b91d182d346507f0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536366336356436346530343962303034313030303764342f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/566c65d64e049b00410007d4)[![Reference Status](https://camo.githubusercontent.com/59e11797ffc740ca42d8df69ce53bfa6fe17dcd9f0c31f7c9821dee53e1e7b8a/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f69726f6e65646765736f6674776172653a66696c652d7574696c732f7265666572656e63655f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/php/ironedgesoftware:file-utils/references)

Description
-----------

[](#description)

This component allows you to load, save, encode and decode files of different types on a very simple way.

Currently supported formats:

- JSON
- YAML

See the roadmap to know which other file types will be supported in future versions.

Usage
-----

[](#usage)

To open a file, use the following code:

```
use IronEdge\Component\FileUtils\File\Factory;

$factory = new Factory();

// $file will be an instance of a subclass of \IronEdge\Component\FileUtils\File\Base .
// It detects the file type by its extension, and creates an instance of the appropiate
// class, if it's available.

$file = $factory->createInstance('/path/to/your/file');

// File contents are lazy loaded and decoded. When you call the "getContents" method, it opens
// the file and decodes its data.

$data = $file->getContents();

// Suppose we've open a JSON file with contents {"myParam": "myValue"}

print_r($data);

// It would print

Array
(
    [myParam] => myValue
)

// If you need to update the file

$data['myParam'] = 'newValue !';

$file->setContents($data);

$file->save();
```

Roadmap
-------

[](#roadmap)

- XML Handling.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/556188?v=4)[Gustavo Falco](/maintainers/comfortablynumb)[@comfortablynumb](https://github.com/comfortablynumb)

---

Top Contributors

[![comfortablynumb](https://avatars.githubusercontent.com/u/556188?v=4)](https://github.com/comfortablynumb "comfortablynumb (22 commits)")

### Embed Badge

![Health badge](/badges/ironedge-file-utils/health.svg)

```
[![Health](https://phpackages.com/badges/ironedge-file-utils/health.svg)](https://phpackages.com/packages/ironedge-file-utils)
```

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

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