czproject / file-matcher
文件匹配器。
v1.1.0
2018-12-26 13:05 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- nette/tester: ^1.7
This package is auto-updated.
Last update: 2024-08-27 01:26:43 UTC
README
安装
composer require czproject/file-matcher
CzProject\FileMatcher
需要 PHP 5.4.0 或更高版本。
用法
<?php use CzProject\FileMatcher\FileMatcher; FileMatcher::matchMask($path, $masks[, $isPathDirectory]); $masks = array( 'temp/*', '.git*', '!.gitignore', ); FileMatcher::matchMask('.git', $masks, TRUE); // returns TRUE FileMatcher::matchMask('.gitignore', $masks); // return FALSE FileMatcher::matchMask('temp/cache', $masks, TRUE); // returns TRUE FileMatcher::matchMask('log/2016', $masks, TRUE); // returns FALSE
许可证: 新BSD许可证
作者: Jan Pecha, https://www.janpecha.cz/