edouardkombo / php-directory-manager
使用 directoryIterator 管理PHP目录的简单类。
dev-master
2014-08-24 22:53 UTC
Requires
- php: >=5.3.3
- codeception/codeception: *
This package is not auto-updated.
Last update: 2024-09-24 02:37:13 UTC
README
关于
Php Directory Manager 帮助您使用 directoryIterator PHP 原生对象管理目录。它可以帮助您创建、浏览、复制和删除目录。
此类已通过 CodeCeption 进行全面测试。
要求
需要PHP版本5.4或更高。
安装
在 composer.json 中注册包
{
"require": {
"edouardkombo/php-directory-manager": "dev-master"
}
}
现在,安装供应商
php composer.phar install
不要忘记执行测试
codecept run unit
文档
$manager = new DirectoryManager();
$manager->setDirectoryIterator('path/to/directory');
//Move content to another directory
$manager->move('path/to/new/directory');
//Move a specific file to another directory
$manager->move('path/to/new/directory', 'NameOfFileToMove');
//Delete all directory content
$manager->delete('path/to/new/directory');
//Delete specific file
$manager->delete('NameOfFileToDelete');
贡献
如果您想帮助我改进此包,请确保它符合 PSR 编码标准。最简单的贡献方式是工作在仓库的检出副本或您的分支上,而不是安装版本。
问题
可以在 Github 问题跟踪器 上提交错误报告和功能请求。
如需更多信息,请直接联系我 edouard.kombo@gmail.com。