<?php defined('SYSPATH') or die('No direct access allowed.'); /** * This class extends the core Kohana class by adding some core application * specific functions, and configuration. * * @package Photo * @category Helpers * @author Deon George * @copyright (c) 2014 Deon George * @license http://dev.leenooks.net/license.html */ class File extends Kohana_File { public static function ParentDirExist($path,$create=FALSE) { $isDir = is_dir($path); if ($isDir OR ! $create) return $isDir; if (File::ParentDirExist(dirname($path),$create)) return mkdir($path); } } ?>