phpdocumentor/flyfinder
最新稳定版本:2.0.0
Composer 安装命令:
composer require phpdocumentor/flyfinder
包简介
Flysystem plugin to add file finding capabilities to the Filesystem entity
关键字:
README 文档
README
FlyFinder
FlyFinder is a utility class for Flysystem that will enable you to find files based on certain criteria.
FlyFinder can search for files that are hidden (either because they are hidden files themselves, or because they are inside a hidden directory), that have a certain extension, or that exist in a certain path.
Flyfinder does not return directories themselves... only files.
Installation
The easiest way to install this library is with Composer using the following command:
$ composer require phpdocumentor/flyfinder
Examples
Ready to dive in and don't want to read through all that text below? Just consult the examples folder and check which type of action that your want to accomplish.
Usage
In order to use the FlyFinder plugin you first need a Flyfinder filesystem with an adapter, for instance the local adapter.
use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter;
use Flyfinder\Finder;
$filesystem = new Filesystem(new LocalAdapter(__DIR__.'/path/to/files/'));
Now you can create the Finder instance:
$finder = new Finder($filesystem);
FlyFinder will need specifications to know what to look for. The following specifications are available:
- IsHidden (this specification will return
truewhen a file or directory is hidden, - HasExtension (this specification will return
truewhen a file or directory has the specified extension), - InPath (this specification will return
truewhen a file is in the given path. Wildcards are allowed.)- note that this path should be considered relative to the
$filesystem's path
- note that this path should be considered relative to the
Specifications can be instantiated as follows:
use Flyfinder\Path;
use Flyfinder\Specification\IsHidden;
use Flyfinder\Specification\HasExtension;
use Flyfinder\Specification\InPath;
$isHidden = new IsHidden();
$hasExtension = new HasExtension(['txt']);
$inPath = new InPath(new Path('mydir'));
Combining specifications
You can search on more criteria by combining the specifications. Specifications can be chained as follows:
$isHidden->andSpecification($hasExtension) will find all files and directories that are hidden AND have the given
extension.
$isHidden->orSpecification($hasExtension) will find all files and directories that are hidden OR have the given
extension.
$isHidden->notSpecification will find all files and directories that are NOT hidden.
You can also make longer chains like this:
$specification = $inPath->andSpecification($hasExtension)->andSpecification($isHidden->notSpecification());
This will find all files in the given path, that have the given extension and are not hidden.
phpdocumentor/flyfinder 适用场景与选型建议
phpdocumentor/flyfinder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 542.38k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「phpdoc」 「Flysystem」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 phpdocumentor/flyfinder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phpdocumentor/flyfinder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 phpdocumentor/flyfinder 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple tool for checking that your PHP classes and methods use PHPDocs (PHP DocBlocks Checker fork).
Backblaze B2 Cloud Storage for Laravel 5. Original by Paul Olthof (@hpolthof) continued by @bringyourownideas
Virtual Filesystem Storage Adapter for Laravel
Laravel package that generates RESTful API documentation in Markdown based on PHPDoc.
Adds Silverstripe Flysystem support for using the Azure Blob adapter
Flysystem adapter for OneDrive or SharePoint
统计信息
- 总下载量: 542.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 34
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04