Skip to content

Commit b89433b

Browse files
authored
Update README and Docs about PathMatcher::except() argument (#54)
1 parent 495bea1 commit b89433b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ use \Yiisoft\Files\FileHelper;
102102
use Yiisoft\Files\PathMatcher\PathMatcher;
103103

104104
$files = FileHelper::findFiles('/path/to/where/to/search', [
105-
'filter' => (new PathMatcher())->only('**.png', '**.jpg')->except('logo.png'),
105+
'filter' => (new PathMatcher())->only('**.png', '**.jpg')->except('**/logo.png'),
106106
]);
107107
```
108108

src/PathMatcher/PathMatcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ public function only(...$patterns): self
102102
/**
103103
* Set list of patterns that the files or directories should not match.
104104
*
105-
* @param PathMatcherInterface|string ...$patterns
105+
* @see https://github.com/yiisoft/strings#wildcardpattern-usage
106+
*
107+
* @param PathMatcherInterface|string ...$patterns Simple POSIX-style string matching.
106108
*
107109
* @return self
108110
*/

0 commit comments

Comments
 (0)