[Finder] Add info about possibilities offered by SplFileInfo

This commit is contained in:
Yannick Warnier 2014-09-26 18:50:02 -05:00 committed by Fabien Potencier
parent d002f1744a
commit b2219cf150
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,10 @@ Finder finds files and directories via an intuitive fluent interface.
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
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
$ 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