private static function path($dir = null) { if ($dir === null) { $dir = \org\rhaco\Conf::get('path', \org\rhaco\io\File::work_path('templates')); } if (substr(str_replace("\\", '/', $dir), -1) == '/') { $dir = subustr($dir, 0, -1); } \org\rhaco\io\File::mkdir($dir, 0777); return $dir; }