axy/fs-paths
最新稳定版本:0.1.1
Composer 安装命令:
composer require axy/fs-paths
包简介
Manipulation of the file system paths
README 文档
README
Manipulation of the file system paths.
- The library does not require any dependencies (except composer packages).
- Tested on PHP 5.4+, PHP 7, HHVM (on Linux), PHP 5.5 (on Windows).
- Install:
composer require axy/fs-paths. - License: MIT.
Documentation
The library provides functions for work with file paths. Normalization, resolving and etc.
The library works with abstract paths. No requests to the real file system.
Contents
- Supported types of file systems
- Static, adapter, path instance
- File Name and Directory Name
- Paths Class
- Adapters
- Path Instance
- Algorithms of Resolving and Normalization
Examples
use axy\fs\paths\Paths; /* Static methods */ Paths::normalize('/one/two/../three'); // "/one/three" /* Adapters */ $posix = Paths::getAdapter('posix'); $win = Paths::getAdapter('windows'); $posix->isAbsolute('c:\config.sys'); // False $win->isAbsolute('c:\config.sys'); // True /* Objects */ $url = Paths::getAdapter('url')->create('http://site.loc/news/view.php?id=10'); $url->resolve('../index.html#footer'); // http://site.loc/index.html#footer $url->params->fragment; // "footer"
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-30