okapi / filesystem
PHP Filesystem 是一个PHP库,它为文件系统提供了一个抽象层。
1.0.0
2023-02-18 14:35 UTC
Requires
- php: >=8.0
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- phpunit/phpunit: >=9.0
This package is auto-updated.
Last update: 2024-09-18 17:58:16 UTC
README
PHP 路径
PHP Filesystem 是一个PHP库,它为文件系统提供了一个抽象层。
它基于Node.js的文件系统模块。
安装
composer require okapi/filesystem
用法
<?php use Okapi\Filesystem\Filesystem; // Write file Filesystem::writeFile('./path/to/file.txt', 'Hello World!'); // Read file $contents = Filesystem::readFile('./path/to/file.txt'); // Remove directory or file Filesystem::rm( './path', recursive: true, force: true, ); // Create directory Filesystem::mkdir( './path/to/directory', recursive: true, mode: 0777, );
测试
- 运行
composer run-script test
或者 - 运行
composer run-script test-coverage
展示你的支持
如果这个项目对你有帮助,请给一个 ⭐!
📝 许可证
版权所有 © 2023 Valentin Wotschel。
本项目遵循MIT许可证。