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

ActiveLibrary

sebastiansulinski/file
======================

File information package

v2.2.0(2y ago)37.1k1MITPHPPHP ^8.2CI failing

Since Nov 27Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (11)Used By (0)

File information package
========================

[](#file-information-package)

File information package for different file types. Currently contains only Image file type implementation.

Usage
-----

[](#usage)

```
require_once "vendor/autoload.php";

use SSD\File\File;
use SSD\File\Type\Image;

$image = new Image(new File('/path/to/the/file.jpg'));

// File specific info
echo $image->path(); // /path/to/the/file.jpg
echo $image->name(); // file.jpg
echo $image->nameWithoutExtension(); // file
echo $image->extension(); // jpg
echo $image->extension(true); // .jpg
echo $image->mimeType(); // image/jpeg

// Size specific info
echo $image->sizeInBytes(); // 49275
echo $image->sizeInBytesPostfix(); // 49275B
echo $image->sizeInKiloBytes(); // 48.12
echo $image->sizeInKiloBytesPostfix(); // 48.12KB
echo $image->sizeInMegaBytes(); // 0.05
echo $image->sizeInMegaBytesPostfix(); // 0.05MB
echo $image->sizeInMegaBytesPostfix(3, ' '); // 0.047 MB

// Image specific info
echo $image->width(); // 600
echo $image->height(); // 450
echo $image->type(); // 1
echo $image->attributes(); // width="600" height="450"
echo $image->isLandscape(); // true / false
echo $image->isPortrait(); // true / false
echo $image->isOfType(IMG_JPG, IMG_PNG); // true / false

// Methods returning all of the above

// as array
$image->toArray();

// as json
$image->toJson();

// as json
$image->toString();

// as json using __toString()
echo $image;
```

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~396 days

Total

10

Last Release

832d ago

Major Versions

1.0.2 → v2.0.02018-03-06

PHP version history (5 changes)v2.0.0PHP ^7.1

v2.1.0PHP ^7.2

v2.1.2PHP ^7.2|^8.0

v2.1.3PHP ^7.3|^8.0

v2.2.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2211203?v=4)[Sebastian Sulinski](/maintainers/sebastiansulinski)[@sebastiansulinski](https://github.com/sebastiansulinski)

---

Top Contributors

[![ssdtutorials](https://avatars.githubusercontent.com/u/18402239?v=4)](https://github.com/ssdtutorials "ssdtutorials (8 commits)")[![sebastiansulinski](https://avatars.githubusercontent.com/u/2211203?v=4)](https://github.com/sebastiansulinski "sebastiansulinski (7 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")

---

Tags

fileinfofilesfinfoimage-infophp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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