定制 okapi/path 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

okapi/path

最新稳定版本:1.0.0

Composer 安装命令:

composer require okapi/path

包简介

PHP Path is a PHP library that provides utilities for handling file paths.

README 文档

README

PHP Path

License: MIT Twitter: @WalterWoshid PHP: >=8.0 Packagist Build

Coverage - PHP 8.0 Coverage - PHP 8.1 Coverage - PHP 8.2

PHP Path is a PHP library that provides utilities for handling file paths.

It is based on Node.js's path module.

Installation

composer require okapi/path

Usage

<?php

use Okapi\Path\Path;

// Resolve

$path = Path::resolve('./path/to/file.txt');
// --> /project/path/to/file.txt

$path = Path::resolve([
    './path/to/file.txt',
    '../project2/file.txt',
]);
// [0] --> /project/path/to/file.txt
// [1] --> /project2/file.txt



// Join

$path = Path::join('/project', 'path', 'to', 'file.txt');
// --> /project/path/to/file.txt

Testing

  • Run composer run-script test
    or
  • Run composer run-script test-coverage

Show your support

Give a ⭐ if this project helped you!

📝 License

Copyright © 2023 Valentin Wotschel.
This project is MIT licensed.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-17