Skip to content

Commit 523c1fd

Browse files
committed
Filesystem 1.1.0
1 parent a4f8a56 commit 523c1fd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<a name="1.1.0"></a>
2+
# [1.1.0](https://github.com/atomastic/filesystem) (2020-12-05)
3+
* add ability to extend Filesystem class with Macros.
4+
5+
```php
6+
use Atomastic\Filesystem\Filesystem;
7+
use Atomastic\Macroable\Macroable;
8+
9+
Filesystem::macro('countFiles', function($path) {
10+
return count(iterator_to_array($this->find()->in($path)->files(), false));
11+
});
12+
13+
$filesytem = new Filesystem();
14+
15+
echo $filesytem->countFiles('/directory');
16+
```
17+
* improve tests for directory `create()` method.
18+
119
<a name="1.0.1"></a>
220
# [1.0.1](https://github.com/atomastic/filesystem) (2020-10-17)
321
* fix Directory copy() method.

0 commit comments

Comments
 (0)