[Finder] Add info about possibilities offered by SplFileInfo
This commit is contained in:
parent
d002f1744a
commit
b2219cf150
|
@ -18,6 +18,10 @@ Finder finds files and directories via an intuitive fluent interface.
|
||||||
print $file->getRealpath()."\n";
|
print $file->getRealpath()."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The resulting contents of the iterator are instances of [SplFileInfo][1]. You can
|
||||||
|
thus use all of SplFileInfo's methods (getPerms(), getSize(), etc) on them. See
|
||||||
|
[the API documentation][2] or the [web tutorial][3] for more.
|
||||||
|
|
||||||
But you can also use it to find files stored remotely like in this example where
|
But you can also use it to find files stored remotely like in this example where
|
||||||
we are looking for files on Amazon S3:
|
we are looking for files on Amazon S3:
|
||||||
|
|
||||||
|
@ -39,3 +43,6 @@ You can run the unit tests with the following command:
|
||||||
$ composer.phar install
|
$ composer.phar install
|
||||||
$ phpunit
|
$ phpunit
|
||||||
|
|
||||||
|
[1]: http://php.net/splfileinfo
|
||||||
|
[2]: http://api.symfony.com/2.5/Symfony/Component/Finder/SplFileInfo.html
|
||||||
|
[3]: http://symfony.com/doc/current/components/finder.html#usage
|
||||||
|
|
Reference in New Issue