phine/path 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phine/path

最新稳定版本:1.1.0

Composer 安装命令:

composer require phine/path

包简介

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

README 文档

README

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.

统计信息

  • 总下载量: 345.37k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 26
  • 点击次数: 1
  • 依赖项目数: 10
  • 推荐数: 0

GitHub 信息

  • Stars: 25
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-08-27