{"id":28540273,"url":"https://github.com/phpdocumentor/flyfinder","last_synced_at":"2025-07-23T12:35:05.725Z","repository":{"id":1103312,"uuid":"38885492","full_name":"phpDocumentor/FlyFinder","owner":"phpDocumentor","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-07T20:07:20.000Z","size":294,"stargazers_count":29,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"2.x","last_synced_at":"2025-07-08T12:42:56.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpDocumentor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"phpDocumentor"}},"created_at":"2015-07-10T14:47:39.000Z","updated_at":"2024-11-07T20:07:20.000Z","dependencies_parsed_at":"2024-06-18T15:19:00.062Z","dependency_job_id":"e526b4a3-46ae-4f55-a936-640a72a7ca8c","html_url":"https://github.com/phpDocumentor/FlyFinder","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/phpDocumentor/FlyFinder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FFlyFinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FFlyFinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FFlyFinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FFlyFinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpDocumentor","download_url":"https://codeload.github.com/phpDocumentor/FlyFinder/tar.gz/refs/heads/2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FFlyFinder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266680332,"owners_count":23967791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T19:08:54.358Z","updated_at":"2025-07-23T12:35:05.714Z","avatar_url":"https://github.com/phpDocumentor.png","language":"PHP","funding_links":["https://github.com/sponsors/phpDocumentor"],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/FlyFinder.svg)](https://scrutinizer-ci.com/g/phpDocumentor/FlyFinder/?branch=master)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/FlyFinder.svg)](https://scrutinizer-ci.com/g/phpDocumentor/FlyFinder/?branch=master)\n[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/FlyFinder.svg)](https://packagist.org/packages/phpDocumentor/FlyFinder)\n[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/FlyFinder.svg)](https://packagist.org/packages/phpDocumentor/FlyFinder)\n\n\nFlyFinder\n=========\n\nFlyFinder is a utility class for [Flysystem](http://flysystem.thephpleague.com/) that will enable you to find files\nbased on certain criteria.\n\nFlyFinder can search for files that are hidden (either because they are hidden files themselves, or because they are\ninside a hidden directory), that have a certain extension, or that exist in a certain path.\n\nFlyfinder does *not* return directories themselves... only files.\n\n## Installation\n\nThe easiest way to install this library is with [Composer](https://getcomposer.org) using the following command:\n\n    $ composer require phpdocumentor/flyfinder\n\n## Examples\n\nReady to dive in and don't want to read through all that text below? Just consult the [examples](examples) folder and\ncheck which type of action that your want to accomplish.\n\n## Usage\n\nIn order to use the FlyFinder plugin you first need a Flyfinder filesystem with an adapter,\nfor instance the local adapter.\n\n    use League\\Flysystem\\Filesystem;\n    use League\\Flysystem\\Local\\LocalFilesystemAdapter as LocalAdapter;\n    use Flyfinder\\Finder;\n\n    $filesystem = new Filesystem(new LocalAdapter(__DIR__.'/path/to/files/'));\n\nNow you can create the `Finder` instance:\n\n    $finder = new Finder($filesystem); \n\nFlyFinder will need specifications to know what to look for. The following specifications are available:\n\n- IsHidden (this specification will return `true` when a file or directory is hidden,\n- HasExtension (this specification will return `true` when a file or directory has the specified extension),\n- InPath (this specification will return `true` when a file is in the given path. Wildcards are allowed.)\n  - note that this path should be considered relative to the `$filesystem`'s path\n\nSpecifications can be instantiated as follows:\n\n    use Flyfinder\\Path;\n    use Flyfinder\\Specification\\IsHidden;\n    use Flyfinder\\Specification\\HasExtension;\n    use Flyfinder\\Specification\\InPath;\n\n    $isHidden = new IsHidden();\n    $hasExtension = new HasExtension(['txt']);\n    $inPath = new InPath(new Path('mydir'));\n\n### Combining specifications\n\nYou can search on more criteria by combining the specifications. Specifications can be chained as follows:\n\n`$isHidden-\u003eandSpecification($hasExtension)` will find all files and directories that are hidden AND have the given\nextension.\n\n`$isHidden-\u003eorSpecification($hasExtension)` will find all files and directories that are hidden OR have the given\nextension.\n\n`$isHidden-\u003enotSpecification` will find all files and directories that are NOT hidden.\n\nYou can also make longer chains like this:\n\n`$specification = $inPath-\u003eandSpecification($hasExtension)-\u003eandSpecification($isHidden-\u003enotSpecification());`\n\nThis will find all files in the given path, that have the given extension and are not hidden.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpdocumentor%2Fflyfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpdocumentor%2Fflyfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpdocumentor%2Fflyfinder/lists"}