From 5b79d39c20b2ecd9567ba8062cc6edcd6d32a98c Mon Sep 17 00:00:00 2001 From: James Newell Date: Mon, 26 May 2014 21:31:39 +1000 Subject: [PATCH] Add create shortcut --- src/deit/filesystem/Finder.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/deit/filesystem/Finder.php b/src/deit/filesystem/Finder.php index bdfb2ea..e1aa91c 100644 --- a/src/deit/filesystem/Finder.php +++ b/src/deit/filesystem/Finder.php @@ -18,6 +18,16 @@ class Finder implements \IteratorAggregate, \Countable { const TYPE_FILE = 'files'; const TYPE_FOLDER = 'folders'; + /** + * Creates a new finder + * @param string $path The path to search + * @return Finder + * @throws + */ + public static function create($path) { + return new self($path); + } + /** * The path to search in * @var string @@ -199,4 +209,4 @@ public function count() { } } - \ No newline at end of file +