yiisoft / files

Useful methods to manage files and directories
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
33 stars 17 forks source link

Glob based on PathMatcherInterface #46

Open samdark opened 3 years ago

samdark commented 3 years ago
$files = FileHelper::glob((new PathMatcher()->only('/var/www/yiiframework.com/**.jpg')));
  1. No need to specify directory such as in findFiles().
  2. Should support absolute paths only.
  3. Should determine non-dynamic part of the pattern /var/www/yiiframework.com/ and start matching from there.
samdark commented 3 years ago

In order for it to be implemented additional interface that can return the base directory is needed.