labcake / path
一个由 PHP7 开发的类,受 nodes 路径模块启发,用于修改和创建路径字符串,也可以读取文件夹/文件信息。
dev-master
2018-05-28 17:36 UTC
Requires
- labcake/system: dev-master
This package is not auto-updated.
Last update: 2024-09-29 05:43:47 UTC
README
一个由 PHP 开发的类,受 nodes 路径模块启发,用于修改和创建路径字符串,也可以读取文件夹/文件信息。
解析路径
// This will return a path to /hello/world Path::resolve("hello", "world");
基本名
Path::basename("test.php");
目录名
Path::dirname("/var/www/test.php");
扩展名
Path::extname("test.php");
解析
Path::parse("test.php");
存在
Path::exists("test.php");
创建目录
// This will create all the folders needed untill the last one is created Path::mkdir("/this/is/a/path/to/create");
删除目录
// This will remove all the subfolders and files in the selected path recursively Path::rmdir("/remove/this/folder");
文档尚未完成