88FlyFinder
99=========
1010
11- FlyFinder is a plugin for [ Flysystem] ( http://flysystem.thephpleague.com/ ) that will enable you to find files
11+ FlyFinder is a utility class for [ Flysystem] ( http://flysystem.thephpleague.com/ ) that will enable you to find files
1212based on certain criteria.
1313
1414FlyFinder can search for files that are hidden (either because they are hidden files themselves, or because they are
@@ -33,14 +33,14 @@ In order to use the FlyFinder plugin you first need a Flyfinder filesystem with
3333for instance the local adapter.
3434
3535 use League\Flysystem\Filesystem;
36- use League\Flysystem\Adapter ;
36+ use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter ;
3737 use Flyfinder\Finder;
3838
39- $filesystem = new Filesystem(new Adapter\Local (__DIR__.'/path/to/files/'));
39+ $filesystem = new Filesystem(new LocalAdapter (__DIR__.'/path/to/files/'));
4040
41- Now you can add the plugin as follows :
41+ Now you can create the ` Finder ` instance :
4242
43- $filesystem->addPlugin( new Finder());
43+ $finder = new Finder($filesystem);
4444
4545FlyFinder will need specifications to know what to look for. The following specifications are available:
4646
@@ -74,6 +74,6 @@ extension.
7474
7575You can also make longer chains like this:
7676
77- ` $specification = $inPath->andSpecification($hasExtension)->andSpecification($isHidden->notSpecification());`
77+ ` $specification = $inPath->andSpecification($hasExtension)->andSpecification($isHidden->notSpecification()); `
7878
7979This will find all files in the given path, that have the given extension and are not hidden.
0 commit comments