Skip to content

Commit

Permalink
[Finder] Add info about possibilities offered by SplFileInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier authored and fabpot committed Oct 1, 2014
1 parent d002f17 commit b2219cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Symfony/Component/Finder/README.md
Expand Up @@ -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:

Expand All @@ -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

0 comments on commit b2219cf

Please sign in to comment.