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 1mo ago

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 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

1484d 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

[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M116](/packages/vich-uploader-bundle)[ankitpokhrel/tus-php

A pure PHP server and client for the tus resumable upload protocol v1.0.0

1.5k7.3M22](/packages/ankitpokhrel-tus-php)[oneup/uploader-bundle

This Symfony bundle provides a server implementation for handling single and multiple file uploads using either FineUploader, jQuery File Uploader, YUI3 Uploader, Uploadify, FancyUpload, MooUpload, Plupload or Dropzone. Features include chunked uploads, orphanages, Gaufrette and Flysystem support.

6066.3M27](/packages/oneup-uploader-bundle)[sonata-project/media-bundle

Symfony SonataMediaBundle

4625.5M71](/packages/sonata-project-media-bundle)[artgris/filemanager-bundle

FileManager is a simple Multilingual File Manager Bundle for Symfony

182420.8k9](/packages/artgris-filemanager-bundle)[esplora/lumos

PHP library for unlock contents from various files with ease.

12141.9k](/packages/esplora-lumos)

PHPackages © 2026

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