PHPackages                             graze/data-file - 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. graze/data-file

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

graze/data-file
===============

File manipulation

v1.0(10y ago)2122MITPHPPHP &gt;=5.6.0

Since Feb 18Pushed 9y ago13 watchersCompare

[ Source](https://github.com/graze/data-file)[ Packagist](https://packagist.org/packages/graze/data-file)[ Docs](https://github.com/graze/data-file)[ RSS](/packages/graze-data-file/feed)WikiDiscussions master Synced 1mo ago

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

data-file
=========

[](#data-file)

[![](https://camo.githubusercontent.com/58c8e13cc1b8877b43a85489e9a9194e9e6a8a8d690b90d3a7f458b67da35c88/687474703a2f2f6d65646961312e67697068792e636f6d2f6d656469612f5a38643143544f69346f6c61302f67697068792e676966)](https://camo.githubusercontent.com/58c8e13cc1b8877b43a85489e9a9194e9e6a8a8d690b90d3a7f458b67da35c88/687474703a2f2f6d65646961312e67697068792e636f6d2f6d656469612f5a38643143544f69346f6c61302f67697068792e676966)

[![Latest Version on Packagist](https://camo.githubusercontent.com/90a044272712d8842f5612ff4153e5387d27c68536f3ffd56988e0192ea3e640/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f646174612d66696c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/data-file)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/402bd4d0378a789ec5b8d34f55da4e6dd26156e8b22e84b994b389918c732ded/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6772617a652f646174612d66696c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/graze/data-file)[![Coverage Status](https://camo.githubusercontent.com/ca8fcffea409cb18aa646e5c61e6d487bb453fe3c0845faf2a6ce279d97b622c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6772617a652f646174612d66696c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/data-file/code-structure)[![Quality Score](https://camo.githubusercontent.com/353211ba3224acac1ed4c7dfacf9b0472a445eda811aebd6f048b3bb19cdd918/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6772617a652f646174612d66696c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/data-file)[![Total Downloads](https://camo.githubusercontent.com/8f9f19d71a1f3c8e0127f94815506a92826f05308d899dbc902a2cca936b30d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617a652f646174612d66696c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/data-file)

File manipulation classes

Install
-------

[](#install)

Via Composer

```
$ composer require graze/data-file
```

Interfaces
----------

[](#interfaces)

- `FileModifierInterface` - Modify a single file
- `FileExpanderInterface` - Expand a single file into a collection of files
- `FileContractorInterface` - Contract a collection of files into a single file
- `FileTransferInterface` - Transfer a file to another file system
- `FileFinderInterface` - Find files based on a configuration
- `FormatInterface` - Format information about a file
- `FormatterInterface` - How to format a file based on a format
- `ParserInterface` - Parse a stream of data
- `ReaderInterface` - Read a stream
- `WriterInterface` - Write a stream

### Things it does

[](#things-it-does)

- Finder: `MetadataFinder` - Will find files based on their metadata (size, created time, etc)
- Format: `CsvFormat`, `JsonFormat` - Defines how a csv or json file is formatted
    - Formatter: `CsvFormatter`, `JsonFormatter` - Format data into csv or json file
    - Parse: `CsvParser`, `JsonParser` - Parse a file containing csv, or json data
- Modify
    - Compression: `Gzip`, `Zip`, `FindCompression` - Compress, decompress and find the compression of files
    - Merge: `Merge` - Join multiple files into a single file
    - Transfer: `Transfer` - Transfer a file from any thephpleague/flysystem Filesystem to another filesystem
    - Encoding: `ConvertEncoding`, `FindEncoding` - Change or find the encoding of a file
    - Line manipulation: `Head`,`Tail` - Retrieve a segment of a file
    - Replace Text: `ReplaceText` - Replace all instances of a string with another string
    - ReFormat: `ReFormat` - Read a file in 1 format and convert to another
- IO
    - Read: `FileReader`,`StreamReader` - Read a file/stream in a specified format
    - Write: `FileWriter`,`StreamWriter` - Write a file/stream in a specified format

Testing
-------

[](#testing)

```
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harry Bragg](https://github.com/h-bragg)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

3677d ago

Major Versions

v0.1 → v1.02016-02-23

v1.0 → 2.0-beta2016-06-07

PHP version history (2 changes)v0.1PHP &gt;=5.5.0

v1.0PHP &gt;=5.6.0

### Community

Maintainers

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

---

Tags

grazedata-file

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/graze-data-file/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.9k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k14](/packages/tempest-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M563](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M201](/packages/sulu-sulu)

PHPackages © 2026

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