private static function checkUpfilePath() { self::$filepath = rtrim(self::$filepath, '/') . '/'; if (!file_exists(self::$filepath)) { if (!mkdir(self::$filepath, 0755, TRUE)) { self::error(-2); return FALSE; } } if (!is_writable(self::$filepath)) { self::error(-1); return FALSE; } return TRUE; }