PHPackages                             primipilus/fileinfo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. primipilus/fileinfo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

primipilus/fileinfo
===================

provides information about file

v1.0.3.1(9y ago)13.0k1MITPHPPHP &gt;=7.1.0

Since Oct 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/primipilus/fileinfo)[ Packagist](https://packagist.org/packages/primipilus/fileinfo)[ Docs](https://github.com/primipilus/fileinfo)[ RSS](/packages/primipilus-fileinfo/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (6)Used By (1)

FileInfo
--------

[](#fileinfo)

Composer install
----------------

[](#composer-install)

```
composer require "primipilus/fileinfo:~1.0"
```

Usage
-----

[](#usage)

```
$info = new FileInfo($path);

echo 'path: ' . $info->path, PHP_EOL;
echo 'mime: ' . $info->mime, PHP_EOL;
echo 'size: ' . $info->size . ' bytes', PHP_EOL;

echo 'dirname: ' . $info->dirname, PHP_EOL;
echo 'basename: ' . $info->basename, PHP_EOL;
echo 'extension: ' . $info->extension, PHP_EOL;
echo 'filename: ' . $info->filename, PHP_EOL;

if ($info->isImage) {
    echo 'width: ' . $info->image->width, PHP_EOL;
    echo 'height: ' . $info->image->height, PHP_EOL;
}

$info2 = new FileInfo($path2);

$info->equals($info2); // :bool
echo $info->sha1, PHP_EOL;
echo $info->md5, PHP_EOL;

$info->extensionCorrespondsToMime; // :bool
$info->extensionsByMime; // :string[]
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

3385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bfadced1affd667d8970d27271e3d227b64a1f55951fe83ad4733b9013e4c71?d=identicon)[primipilus](/maintainers/primipilus)

---

Top Contributors

[![primipilus](https://avatars.githubusercontent.com/u/19665318?v=4)](https://github.com/primipilus "primipilus (6 commits)")

---

Tags

file infoinformation about file

### Embed Badge

![Health badge](/badges/primipilus-fileinfo/health.svg)

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

###  Alternatives

[lee-to/laravel-seo-by-url

Easy seo for Laravel and MoonShine

239.4k](/packages/lee-to-laravel-seo-by-url)

PHPackages © 2026

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