appzz/finder

查找文件、排序、过滤使用迭代器

2.0.5 2022-08-22 10:40 UTC

This package is auto-updated.

Last update: 2024-09-29 04:49:22 UTC


README

通过 RecursiveIteratorIterator 查找文件

  • 搜索文件,按类型过滤,排序项,忽略(或不禁用)隐藏文件

用法

$finder = Finder::factory('path/to/dir')
			->types', ['mp4', 'mov']
			->exclude ('(foo|bar)')
			->exclude_paths('path')
			->hidden(FALSE)
			->find()
			->sort('size', TRUE); //name, date, type

$files = get_files(['mtime', 'size', 'owner', 'perms']);			

var_dump($files);