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.6(10mo ago)01.6k↓23.1%6MITPHPPHP &gt;=8.0

Since Dec 9Pushed 10mo ago1 watchersCompare

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

READMEChangelog (7)DependenciesVersions (8)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

37

—

LowBetter than 83% of packages

Maintenance55

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community14

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

Every ~98 days

Recently: every ~132 days

Total

7

Last Release

303d 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 (10 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)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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