diff --git a/composer.json b/composer.json index 064adaa..f3dd575 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,19 @@ } ], "require": { + "php": ">=5.5.0", "task/plugin": "~1.0", - "symfony/filesystem": "~2.4" + "symfony/filesystem": "~2.5", + "symfony/finder": "~2.5" }, "require-dev": { - "task/task": "~0.1", - "task/phpspec": "~0.1", + "phpspec/phpspec": "~2.1", + "task/task": "~0.1.0", + "task/phpspec": "~0.1.1", "bossa/phpspec2-expect": "~1.0", "henrikbjorn/phpspec-code-coverage" : "1.0.*@dev", - "symfony/finder": "~2.4", "mikey179/vfsStream": "~1.2", - "satooshi/php-coveralls": "~0.6" + "satooshi/php-coveralls": "~0.6.0" }, "autoload": { "psr-4": { diff --git a/src/Filesystem/Finder.php b/src/Filesystem/Finder.php new file mode 100644 index 0000000..04eaf95 --- /dev/null +++ b/src/Filesystem/Finder.php @@ -0,0 +1,20 @@ +write($this->read()); + } +} diff --git a/src/FilesystemPlugin.php b/src/FilesystemPlugin.php index bc2409f..289eb18 100644 --- a/src/FilesystemPlugin.php +++ b/src/FilesystemPlugin.php @@ -7,6 +7,8 @@ use Symfony\Component\Filesystem\Exception\FileNotFoundException; use Task\Plugin\Filesystem\File; use Task\Plugin\Filesystem\FilesystemIterator; +use Task\Plugin\Filesystem\Finder; +use FilterIterator; class FilesystemPlugin extends Filesystem implements PluginInterface { @@ -26,6 +28,11 @@ public function ls($dir) return new FilesystemIterator($dir); } + public function find() + { + return new Finder; + } + public function copy($source, $target, $override = false) { $target = rtrim($target, '/');