Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 19, 2021. It is now read-only.

box-project/box2-path

Repository files navigation

Path

Build Status Coverage Status Latest Stable Version Total Downloads

This library provides a utility methods for file system paths.

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

Installation

Via Composer:

$ composer require "phine/path=~1.0"

Documentation

You can find the documentation in the docs/ directory.

License

This library is available under the MIT license.

About

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

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /