photo/application/classes/File.php

25 lines
603 B
PHP
Raw Normal View History

2015-05-15 04:12:10 +00:00
<?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);
}
}
?>