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

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

phant/file
==========

Manage file easily

2.4(7mo ago)13.9k↓62.1%MITPHPPHP &gt;=8.2

Since Apr 13Pushed 7mo ago1 watchersCompare

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

READMEChangelog (8)Dependencies (3)Versions (11)Used By (0)

Files
=====

[](#files)

Requirments
-----------

[](#requirments)

PHP &gt;= 8.1

Install
-------

[](#install)

`composer require phant/file`

Usages
------

[](#usages)

### File

[](#file)

```
use Phant\File\File;

$file = new File('path/filename.ext');
```

#### Get file path

[](#get-file-path)

```
$filePath = $file->getPath();
```

#### Verify if file exist file path

[](#verify-if-file-exist-file-path)

```
$fileExist = $file->exist();
```

#### Delete file

[](#delete-file)

```
$file->delete();
```

#### Get temporary path

[](#get-temporary-path)

```
$temoraryDirectory = $file->getTemoraryDirectory();
```

#### Clean filename

[](#clean-filename)

```
$cleanFilename = File::cleanFilename($dirtyFilename);
```

#### Download file to temporary directory

[](#download-file-to-temporary-directory)

```
$file = File::download($fileUrl);
```

### Csv file

[](#csv-file)

```
use Phant\File\Csv;

$file = new File('path/filename.csv');
```

#### Verify columns

[](#verify-columns)

```
$isConform = $file->verifyColumns($columns);
```

#### Get number of lines

[](#get-number-of-lines)

```
$nbLines = $file->getNbLines();
```

#### Read file by line

[](#read-file-by-line)

```
foreach ($file->readFileByLine() as $line) {

}
```

### Zip file

[](#zip-file)

```
use Phant\File\Zip;

$file = new File('path/filename.zip');
```

#### Unarchive

[](#unarchive)

```
$files = $file->unarchive();
foreach ($files as $file) {
}
```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance64

Regular maintenance activity

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

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

Recently: every ~282 days

Total

9

Last Release

221d ago

Major Versions

1.3 → 2.02022-10-21

PHP version history (3 changes)1.0PHP ^8.0

2.0PHP &gt;=8.1

2.2PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ce749176c74e4c4fd7bd457cdad471fd1e0e14092259e60e7330724ce622dce?d=identicon)[Phant](/maintainers/Phant)

---

Top Contributors

[![lennyrouanet](https://avatars.githubusercontent.com/u/5269913?v=4)](https://github.com/lennyrouanet "lennyrouanet (14 commits)")

---

Tags

file managerfile readercsv readerfile loadercsv file

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[helios-ag/fm-elfinder-bundle

ElFinder bundle, adds ElFinder file manager to your Symfony project

2865.1M31](/packages/helios-ag-fm-elfinder-bundle)[artgris/filemanager-bundle

FileManager is a simple Multilingual File Manager Bundle for Symfony

186446.6k13](/packages/artgris-filemanager-bundle)[components/elfinder

ElFinder FileManager

551.9M1](/packages/components-elfinder)[mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual operating modes, drag-and-drop uploads, S3/MinIO support, and comprehensive security features.

7620.3k3](/packages/mwguerra-filemanager)[jasekz/laradrop

File manager using Dropzone.js for Laravel 5 | 6 | 7 | 8

7310.3k1](/packages/jasekz-laradrop)[laravel-enso/files

File management backend for Laravel Enso

1644.9k38](/packages/laravel-enso-files)

PHPackages © 2026

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