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

ActiveLibrary

mutant/file
===========

Mutant Shared Packages.

064PHP

Since Jan 3Pushed 8y agoCompare

[ Source](https://github.com/nick-shared/php-file)[ Packagist](https://packagist.org/packages/mutant/file)[ RSS](/packages/mutant-file/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

file
====

[](#file)

Shared File helper functions

#### Installation

[](#installation)

1. `composer require mutant/file`

### Note: Until I make actual docs all the documentation is in docblocks.

[](#note-until-i-make-actual-docs-all-the-documentation-is-in-docblocks)

#### General Notes

[](#general-notes)

1. File Modes

```
r	Read only mode, with the file pointer at the start of the file.
r+	Read/Write mode, with the file pointer at the start of the file.
w	Write only mode. Truncates the existing file by overwriting it. If file doesn’t exist the fopen() function creates a new file.
w+	Read/Write mode. Truncates the existing file by overwriting it. If file doesn’t exist the fopen() function creates a new file.
a	Append mode, with the file pointer at the end of the file. If the file doesn’t exist, the fopen() function creates a new file.
a+	Read/Append mode, with the file pointer at the end of the file. If the file doesn’t exist, the fopen() function creates a new file.
x	Create and open for writing only. If the file exists already, it returns FALSE and generates an error. If file doesn’t exist, a new file is created.
x+	Create and open for reading and writing. If the file exists already, it returns FALSE and generates an error. If file doesn’t exist, a new file is created.

```

2. Raw php file functions

- fopen() is used to open a file if it exists or it creates a file if it doesn’t exist.
    - if the fopen() function fails to create a file or open a file, it returns 0 (zero).
- fclose() used to close an open file
    - fclose() function returns true on success and false on failure

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

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://www.gravatar.com/avatar/29cad76b1c1a1a148cea690d22818a084a1939d1372d4625335b151de14f9a2e?d=identicon)[nickkiermaier](/maintainers/nickkiermaier)

---

Top Contributors

[![0foo](https://avatars.githubusercontent.com/u/6382763?v=4)](https://github.com/0foo "0foo (36 commits)")

### Embed Badge

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

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

PHPackages © 2026

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