00001 <?php
00002 require_once("Varien/Directory/Collection.php");
00003 require_once("Varien/File/Object.php");
00004
00005 class Varien_Directory_Factory{
00006
00007
00008
00009
00010
00011
00012
00013
00014 static public function getFactory($path,$is_recursion = true,$recurse_level=0)
00015 {
00016 if(is_dir($path)){
00017 $obj = new Varien_Directory_Collection($path,$is_recursion,$recurse_level+1);
00018 return $obj;
00019 } else {
00020 return new Varien_File_Object($path);
00021 }
00022 }
00023
00024 }
00025 ?>