Download the PHP package phpdocumentor/flyfinder without Composer

On this page you can find all versions of the php package phpdocumentor/flyfinder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flyfinder

License: MIT Scrutinizer Code Coverage Scrutinizer Code Quality Stable Version Unstable Version

FlyFinder

FlyFinder is a plugin 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\Adapter;
use Flyfinder\Finder;

$filesystem = new Filesystem(new Adapter\Local(__DIR__.'/path/to/files/'));

Now you can add the plugin as follows:

$filesystem->addPlugin(new Finder());

FlyFinder will need specifications to know what to look for. The following specifications are available:

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.


All versions of flyfinder with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2||^8.0
league/flysystem Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpdocumentor/flyfinder contains the following files

Loading the files please wait ....