PHPackages                             piyo2/path - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. piyo2/path

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

piyo2/path
==========

Filesystem path utility

v1.1.0(2y ago)0311MITPHPPHP &gt;=7.1.0

Since Oct 10Pushed 2y ago1 watchersCompare

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

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

piyo2/path
==========

[](#piyo2path)

Path utilities for PHP.

Installation
------------

[](#installation)

```
composer require piyo2/path
```

Usage
-----

[](#usage)

### Join paths

[](#join-paths)

```
use piyo2\util\path\Path;

Path::join('foo', 'bar'); // => 'foo/bar'
Path::join('foo', 'bar', 'baz'); // => 'foo/bar/baz'
Path::join('/foo', 'bar'); // => '/foo/bar'
Path::join('./foo', 'bar'); // => './foo/bar'
Path::join('/foo/bar/baz', '../qux'); // => '/foo/bar/qux'
```

### Sanitize file name

[](#sanitize-file-name)

```
use piyo2\util\path\Path;

Path::sanitizeFileName('foo'); // => 'foo'
Path::sanitizeFileName('f/o\\oa|r'); // => 'f_o_o_b_a_r'
Path::sanitizeFileName('.foo'); // => 'foo'
Path::sanitizeFileName('foo..bar'); // => 'foo__bar'

// Allow beginning dot
Path::sanitizeFileName('.foo', true); // => '.foo'
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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

Total

2

Last Release

942d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aa0a053807078660f519d4bee9f5219653cd5d730c90b4decd0ab465d3c098e?d=identicon)[sharapeco](/maintainers/sharapeco)

---

Top Contributors

[![sharapeco](https://avatars.githubusercontent.com/u/1665651?v=4)](https://github.com/sharapeco "sharapeco (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/piyo2-path/health.svg)

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

###  Alternatives

[elements/process-manager-bundle

The Process Manager allows you to manage (define,execute...) arbitrary processes/commands in the Pimcore backend.

49633.0k5](/packages/elements-process-manager-bundle)[ijeffro/laravel-cities

Laravel Cities is a bundle for Laravel, providing Iata Code ISO 3166 3 and country codes for all the cities.

118.2k](/packages/ijeffro-laravel-cities)

PHPackages © 2026

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