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

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

msgframework/file
=================

v0.1.3(4y ago)0781MITPHPPHP &gt;=7.4

Since Jan 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/msgframework/File)[ Packagist](https://packagist.org/packages/msgframework/file)[ RSS](/packages/msgframework-file/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (10)Used By (1)

The File library
================

[](#the-file-library)

[![Latest Stable Version](https://camo.githubusercontent.com/0ae82bf68b285eb25f5e64f965c60a2462f8f6bb619a5f70d7104d0d1237dc3d/687474703a2f2f706f7365722e707567782e6f72672f6d73676672616d65776f726b2f66696c652f76)](https://packagist.org/packages/msgframework/file)[![Total Downloads](https://camo.githubusercontent.com/44c1a073409b334c05682275eacfb138fa64e620156576c1d17187cb6ff07518/687474703a2f2f706f7365722e707567782e6f72672f6d73676672616d65776f726b2f66696c652f646f776e6c6f616473)](https://packagist.org/packages/msgframework/file)[![Latest Unstable Version](https://camo.githubusercontent.com/9246bf5aec4686a839abba6c3c866dc0633bb77bfa000438fb4fe82871631698/687474703a2f2f706f7365722e707567782e6f72672f6d73676672616d65776f726b2f66696c652f762f756e737461626c65)](https://packagist.org/packages/msgframework/file)[![License](https://camo.githubusercontent.com/ff4a262fda639cfd0ba769b432f8eb3e87afc9b473fc5f4011cf4f461bc8947f/687474703a2f2f706f7365722e707567782e6f72672f6d73676672616d65776f726b2f66696c652f6c6963656e7365)](https://packagist.org/packages/msgframework/file)[![PHP Version Require](https://camo.githubusercontent.com/eb3c4a8ea4e6125c8305c34a0390ec121d53e93dd4996e31995ffbf895b58385/687474703a2f2f706f7365722e707567782e6f72672f6d73676672616d65776f726b2f66696c652f726571756972652f706870)](https://packagist.org/packages/msgframework/file)

About
-----

[](#about)

This library provides utilities for the file.

Usage
-----

[](#usage)

### Create file

[](#create-file)

```
...
use Msgframework\Lib\File\File;

$file = new File($path);
```

### Get file extension

[](#get-file-extension)

```
...
$file = new File($path);
$allow_extensions = array('jpg', 'png');

if (!in_array($extension = $file->getExtension(), $allow_extensions)) {
    throw new \RuntimeException(sprintf('File extension "%s" not allowed, allow: %s', $extension, implode(", ", $allow_extensions)));
}
```

### Get file content

[](#get-file-content)

```
...
$file = new File($path);

$content = $file->getContent();
```

Installation
------------

[](#installation)

You can install this package easily with [Composer](https://getcomposer.org/).

Just require the package with the following command:

```
$ composer require msgframework/file

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

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.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~26 days

Total

9

Last Release

1530d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6879a1f83db6685dc9507b7ad0660480e48e173c053147f3202bdb8d2e4f3bfb?d=identicon)[MSGroupFM](/maintainers/MSGroupFM)

---

Top Contributors

[![MSGroupFM](https://avatars.githubusercontent.com/u/10297569?v=4)](https://github.com/MSGroupFM "MSGroupFM (1 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[vich/uploader-bundle

Ease file uploads attached to entities

1.9k27.6M142](/packages/vich-uploader-bundle)[symfony/mailer

Helps sending emails

1.6k409.1M1.4k](/packages/symfony-mailer)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)

PHPackages © 2026

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