Update storage.php

This commit is contained in:
Namhyeon Go 2018-06-13 17:50:54 +09:00 committed by GitHub
parent bbb49dcf3d
commit 24cb97abab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,3 +201,15 @@ if(!function_exists("check_file_extension")) {
return (get_file_extension($file) === $extension); return (get_file_extension($file) === $extension);
} }
} }
if(!function_exists("get_file_name")) {
function get_file_name($name, $extension="", $basepath="") {
$result = "";
$result .= empty($basepath) ? "" : ($name . "/");
$result .= $name;
$result .= empty($extension) ? "" : ("." . $extension);
return $result;
}
}