PHPackages                             pmvc-plugin/file\_info - 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. pmvc-plugin/file\_info

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

pmvc-plugin/file\_info
======================

PMVC Plugin for File information

0.1.5(7y ago)01.2k—0%1MITPHP

Since Sep 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/pmvc-plugin/file_info)[ Packagist](https://packagist.org/packages/pmvc-plugin/file_info)[ RSS](/packages/pmvc-plugin-file-info/feed)WikiDiscussions master Synced 2mo ago

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

[![Latest Stable Version](https://camo.githubusercontent.com/002e668066f8b414a2ebdbceaa7cde4ce58189e8251b76a2e6038ad3b584a498/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f66696c655f696e666f2f762f737461626c65)](https://packagist.org/packages/pmvc-plugin/file_info)[![Latest Unstable Version](https://camo.githubusercontent.com/7aa9238d7db9e603a33ba428c89e7e25e05b98bac2df0bdd0de544a8b2b935d7/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f66696c655f696e666f2f762f756e737461626c65)](https://packagist.org/packages/pmvc-plugin/file_info)[![Build Status](https://camo.githubusercontent.com/ab444501c9a073db8ea8c160b11b07de071731a615323d739655482459117d73/68747470733a2f2f7472617669732d63692e6f72672f706d76632d706c7567696e2f66696c655f696e666f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pmvc-plugin/file_info)[![License](https://camo.githubusercontent.com/d4c2bcbbb2697fc61817119f2efe4b26ef755259ff2785a0530c2eda09082488/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f66696c655f696e666f2f6c6963656e7365)](https://packagist.org/packages/pmvc-plugin/file_info)[![Total Downloads](https://camo.githubusercontent.com/1afe4727134542c3e51fd239a181d94a5f272e91e668bc547aeeaa6b27c4a22f/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f66696c655f696e666f2f646f776e6c6f616473)](https://packagist.org/packages/pmvc-plugin/file_info)

File Information Plugin
=======================

[](#file-information-plugin)

Table of Contents
-----------------

[](#table-of-contents)

- [Introduction](#introduction)
- [Install with Composer](#install-with-composer)
- [How to use](#how-to-use)

Introduction
------------

[](#introduction)

This is a file information library, could help you get file size or time.

Install with Composer
---------------------

[](#install-with-composer)

### 1. Download composer

[](#1-download-composer)

- mkdir test\_folder
- curl -sS  | php

### 2. Install by composer.json or use command-line directly

[](#2-install-by-composerjson-or-use-command-line-directly)

#### 2.1 Install by composer.json

[](#21-install-by-composerjson)

- vim composer.json

```
{
    "require": {
        "pmvc-plugin/file_info": "dev-master"
    }
}

```

- php composer.phar install

#### 2.2 Or use composer command-line

[](#22-or-use-composer-command-line)

- php composer.phar require pmvc-plugin/file\_info

How to use
----------

[](#how-to-use)

### Use Path only (file don't need exists)

[](#use-path-only-file-dont-need-exists)

```
include_once('vendor/autoload.php');
PMVC\Load::plug();
$fileInfo = \PMVC\plug('file_info');
$fileInfo->path('/abc/abc.php')->getExt(); // will return "php"

```

#### Path functions

[](#path-functions)

- getExt()
- getContentType()
    - Return content-type, such as "image/png"

### Use with file (file need exists)

[](#use-with-file-file-need-exists)

```
include_once('vendor/autoload.php');
PMVC\Load::plug();
$fileInfo = \PMVC\plug('file_info');
$fileInfo->file('/abc/abc.php')->getExt(); // will return "php"

```

### File functions (extends all Path functions)

[](#file-functions-extends-all-path-functions)

- realPath()
    - Get realpath
- getSize()

```
   $fileInfo = \PMVC\plug('file_info');
   $size = $fileInfo->file('/abc/abc.php')->getSize();
   echo $size; //transafer to readable format automatically by __tostring()

```

- getTime()

```
   $fileInfo = \PMVC\plug('file_info');
   $accessTime = $fileInfo->file('/abc/abc.php')->getTime()->atime();
   echo $accessTime; //transafer to readable format automatically by __tostring()

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2795d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f593111e77142a10224458b0436e6b2d6f3e537f924c03130f0208bd3c4477f?d=identicon)[HillLiu](/maintainers/HillLiu)

---

Top Contributors

[![HillLiu](https://avatars.githubusercontent.com/u/1877738?v=4)](https://github.com/HillLiu "HillLiu (17 commits)")

---

Tags

fileplug-inpmvc

### Embed Badge

![Health badge](/badges/pmvc-plugin-file-info/health.svg)

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72528.6M91](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)

PHPackages © 2026

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