spol / path
A PHP library for manipulating paths.
Installs: 1 693
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.2
Requires (Dev)
- ext-runkit: *
- phpunit/phpunit: >=3.7
- tcz/phpunit-mockfunction: *@dev
This package is not auto-updated.
Last update: 2024-12-21 16:20:40 UTC
README
Path is a simple library for manipulating strings containing filesystem paths.
Installation
Through composer:
{ "require": { "spol/path": "0.1.*" } }
Usage
There are two concrete implementations of the Spol\Path\AbstractPath class, Spol\Path\UnixPath and Spol\Path\WindowsPath. Both provide the same interface, but handle directory separators and drive letters differently.
The Spol\Path\Path
class provides a static facade to the appropriate class for the current system. Alternatively, either
class can be used directly, such as for working with paths for a different system.
Path::normalize('/usr/local/../bin') // '/usr/bin'
To Be Completed.