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

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

krzysztofzylka/file
===================

File and directory library

1.0.7(1mo ago)02.4k↓48.7%6MITPHPPHP &gt;=8.0

Since Dec 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/krzysztofzylka/File)[ Packagist](https://packagist.org/packages/krzysztofzylka/file)[ RSS](/packages/krzysztofzylka-file/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (8)DependenciesVersions (10)Used By (6)

Install
=======

[](#install)

```
composer require krzysztofzylka/file
```

Methods
=======

[](#methods)

Repair path
-----------

[](#repair-path)

```
\Krzysztofzylka\File\File::repairPath('path')
```

Create directory
----------------

[](#create-directory)

Permission 0755 is default

```
\Krzysztofzylka\File\File::mkdir('path', 0755)
```

or

```
\Krzysztofzylka\File\File::mkdir(['path', 'path2'])
```

Remove
------

[](#remove)

```
\Krzysztofzylka\File\File::unlink('path')
```

Recursive scan directory
------------------------

[](#recursive-scan-directory)

```
\Krzysztofzylka\File\File::scanDir('directory path')
```

Create file
-----------

[](#create-file)

```
\Krzysztofzylka\File\File::touch('path', 'value') //value is not required
```

Copy file
---------

[](#copy-file)

```
\Krzysztofzylka\File\File::copy('source path', 'destination path')
```

Copy directory
--------------

[](#copy-directory)

```
\Krzysztofzylka\File\File::copyDirectory('source path', 'destination path');
```

Get file extension
------------------

[](#get-file-extension)

```
\Krzysztofzylka\File\File::getExtension('file path')
```

Get file content type
---------------------

[](#get-file-content-type)

```
\Krzysztofzylka\File\File::getContentType('file extension')
```

Get file mime type
------------------

[](#get-file-mime-type)

```
\Krzysztofzylka\File\File::getMimeType('file path')
```

Validations
===========

[](#validations)

File size validation
--------------------

[](#file-size-validation)

```
\Krzysztofzylka\File\Validation::size('file size in bytes or file path', 'allowed file size in mb')
```

File mime type
--------------

[](#file-mime-type)

```
\Krzysztofzylka\File\Validation::mimeType('file path', ['allowed mime type list'])
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance88

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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 ~125 days

Recently: every ~134 days

Total

8

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b71301619d71d2798d3a84f23de616ac1f1c185ab72e4f03e925cff169b03a0d?d=identicon)[krzysztofzylka](/maintainers/krzysztofzylka)

---

Top Contributors

[![krzysztofzylka](https://avatars.githubusercontent.com/u/41385342?v=4)](https://github.com/krzysztofzylka "krzysztofzylka (12 commits)")[![krzysztofzylka-wins](https://avatars.githubusercontent.com/u/291765431?v=4)](https://github.com/krzysztofzylka-wins "krzysztofzylka-wins (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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