public static function mkdirParents($path) { if (is_dir($path)) { return true; } if (static::mkdirParents(dirname($path))) { return mkdir($path); } }