hail/path

v0.8.4 2019-09-24 08:48 UTC

This package is auto-updated.

Last update: 2024-04-16 11:30:58 UTC


README

Example

use Hail\Path\{Path, BasePath};

$paths = new Path([
    'root' => __DIR__,
    'storage' => __DIR__ .  '/storage',
]);

$paths->root instanceof BasePath; // true
$paths->root->base() === $paths->root(); // true
$paths->root->absolute('a', 'b') === $paths->root('a', 'b'); // true

$paths->storage instanceof BasePath; // true
$paths->storage->base() === $paths->root('storage'); // true
$paths->root->relative($paths->storage()) === 'storage'; // true