PHPackages                             rosell-dk/file-util - 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. rosell-dk/file-util

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

rosell-dk/file-util
===================

Functions for dealing with files and paths

0.1.1(4y ago)27.0M—5.4%[1 issues](https://github.com/rosell-dk/file-util/issues)1MITPHPPHP &gt;=5.4

Since Apr 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rosell-dk/file-util)[ Packagist](https://packagist.org/packages/rosell-dk/file-util)[ GitHub Sponsors](https://github.com/rosell-dk)[ Fund](https://ko-fi.com/rosell)[ RSS](/packages/rosell-dk-file-util/feed)WikiDiscussions master Synced 1mo ago

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

File Util
=========

[](#file-util)

[![Build Status](https://github.com/rosell-dk/file-util/workflows/build/badge.svg)](https://github.com/rosell-dk/file-util/actions/workflows/php.yml)[![Software License](https://camo.githubusercontent.com/c034ea3669e2235bbe1c2c8756eecebcc6384b71bfec57ad155c5e3f33cd1387/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3431383637372e737667)](https://github.com/rosell-dk/file-util/blob/master/LICENSE)[![Coverage](https://camo.githubusercontent.com/9eb998e49fd652ead56a6655d0b1b09b7d7ce8f3f1bac107bdf929875c464e11/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f6c6974746c652d622e69742f66696c652d7574696c2f636f64652d636f7665726167652f636f7665726167652d62616467652e6a736f6e)](http://little-b.it/file-util/code-coverage/coverage/index.html)[![Latest Stable Version](https://camo.githubusercontent.com/b479d66e8ae23ae187c46f15a93ff89702010df5758c30c31f3aec0ca6418fc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f73656c6c2d646b2f66696c652d7574696c2e737667)](https://packagist.org/packages/rosell-dk/file-util)[![Minimum PHP Version](https://camo.githubusercontent.com/92594fcbfef612487bf751bb109de3c816a76364bec2d6dbc7fd8dd90c4a1026/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f726f73656c6c2d646b2f66696c652d7574696c)](https://php.net)

Just a bunch of handy methods for dealing with files and paths:

- *FileExists::fileExists($path)*:
    A well-behaved version of *file\_exists* that throws upon failure rather than emitting a warning
- *FileExists::fileExistsTryHarder($path)*:
    Also well-behaved. Tries FileExists::fileExists(). In case of failure, tries exec()-based implementation
- *PathValidator::checkPath($path)*:
    Check if path looks valid and doesn't contain suspecious patterns
- *PathValidator::checkFilePathIsRegularFile($path)*:
    Check if path points to a regular file (and doesnt match suspecious patterns)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

2

Last Release

1491d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17592708?v=4)[Bjørn Rosell](/maintainers/rosell-dk)[@rosell-dk](https://github.com/rosell-dk)

---

Top Contributors

[![rosell-dk](https://avatars.githubusercontent.com/u/17592708?v=4)](https://github.com/rosell-dk "rosell-dk (22 commits)")

---

Tags

pathfilesutil

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rosell-dk-file-util/health.svg)

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

###  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)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[mikehaertl/php-tmpfile

A convenience class for temporary files

9729.7M20](/packages/mikehaertl-php-tmpfile)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)

PHPackages © 2026

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