PHPackages                             phine/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. [File &amp; Storage](/categories/file-storage)
4. /
5. phine/path

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

phine/path
==========

A PHP library for improving the use of file system paths.

1.1.0(12y ago)26348.8k↑114.1%1[1 PRs](https://github.com/box-project/box2-path/pulls)10MITPHPPHP &gt;=5.3.3

Since Aug 28Pushed 12y ago1 watchersCompare

[ Source](https://github.com/box-project/box2-path)[ Packagist](https://packagist.org/packages/phine/path)[ Docs](https://github.com/phine/lib-path)[ RSS](/packages/phine-path/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (10)

Path
====

[](#path)

[![Build Status](https://camo.githubusercontent.com/62d117b10ebe08bdb4caefb3d769734a9c6f5b32fb13b15e70e72d093392cd3e/68747470733a2f2f7472617669732d63692e6f72672f7068696e652f6c69622d706174682e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/phine/lib-path)[![Coverage Status](https://camo.githubusercontent.com/8ec2fdafaf04ef9f1666ef7fe44ffb30921f75d28c8aee0791b655ba3053b85f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7068696e652f6c69622d706174682f62616467652e706e67)](https://coveralls.io/r/phine/lib-path)[![Latest Stable Version](https://camo.githubusercontent.com/28ee98eaae9d326f87d09b57eff77988730346b8bb361e7075e656e51901b328/68747470733a2f2f706f7365722e707567782e6f72672f7068696e652f706174682f762f737461626c652e706e67)](https://packagist.org/packages/phine/path)[![Total Downloads](https://camo.githubusercontent.com/7d28fcc7687136d4291405007deb5c32dc5776d642a19847f2d08673d75dd69e/68747470733a2f2f706f7365722e707567782e6f72672f7068696e652f706174682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phine/path)

This library provides a utility methods for file system paths.

Usage
-----

[](#usage)

```
use Phine\Path\Path;

var_export(Path::canonical('/path/to/../canonicalize'));
// /path/canonicalize

var_export(Path::copy('/path/to/copy', '/path/to/copy/to'));
// 123 (number of files or empty directories copied)

var_export(Path::current());
// /home/user

var_export(Path::isAbsolute('/path/to/../test'));
// true

var_export(Path::isAbsolute('../test'));
// false

var_export(Path::isLocal('path/to/test'));
// true

var_export(Path::isLocal('\\windows\share'));
// false

var_export(Path::isLocal('http://example.com/'));
// false

var_export(Path::join(array('path', 'to', 'test'));
// path/to/test
// path\\to\\test

var_export(Path::remove('/path/to/recursively/remove'));
// 123 (number of paths removed)

var_export(Path::split('/path/to/test'));
// array('path', 'to', 'test')

var_export(Path::split('C:\\path\\to\\test'));
// array('C:', 'path', 'to', 'test')
```

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.3.3
- [Phine Exception](https://github.com/phine/lib-exception) &gt;= 1.0

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

[](#installation)

Via [Composer](http://getcomposer.org/):

```
$ composer require "phine/path=~1.0"

```

Documentation
-------------

[](#documentation)

You can find the documentation in the [`docs/`](docs/) directory.

License
-------

[](#license)

This library is available under the [MIT license](LICENSE).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4598d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9122157?v=4)[Kevin Herrera](/maintainers/kherge)[@kherge](https://github.com/kherge)

---

Top Contributors

[![kherge](https://avatars.githubusercontent.com/u/9122157?v=4)](https://github.com/kherge "kherge (17 commits)")

---

Tags

pathfilesystem

### Embed Badge

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

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

###  Alternatives

[adlawson/vfs

Virtual file system

300433.0k21](/packages/adlawson-vfs)[wikimedia/relpath

Work with file paths to join or find the relative path

11894.3k2](/packages/wikimedia-relpath)[riimu/kit-pathjoin

Cross-platform library for normalizing and joining file system paths

12603.0k4](/packages/riimu-kit-pathjoin)[internal/path

Type-safe, immutable file path library with cross-platform support and automatic normalization.

1137.7k3](/packages/internal-path)

PHPackages © 2026

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