Update storage.php

This commit is contained in:
Namhyeon Go 2018-08-24 23:43:23 +09:00 committed by GitHub
parent 00b02eaa8f
commit 55dec2724b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,26 @@
* @brief Stroage module for ReasonableFramework
*/
if(!function_exists("get_working_dir")) {
function get_working_dir($method="getcwd") {
$working_dir = "";
switch($method) {
case "getcwd":
$working_dir = getcwd();
break;
case "dirname":
$working_dir = dirname(__FILE__);
break;
case "basename":
$working_dir = basename(__DIR__);
break;
}
return $working_dir;
}
});
if(!function_exists("get_storage_dir")) {
function get_storage_dir() {
return "storage";