2 * Copyright (c) 2018 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "analog-watch.h"
22 * @brief Creates path to the given resource file by concatenation of the basic resource path and the given file_name.
23 * @param[in] file_name File name or path relative to the resource directory.
24 * @return: The absolute path to the resource with given file_name is returned.
26 char *utils_create_resource_path(const char *file_name)
28 static char res_path_buff[PATH_MAX] = {0,};
29 char *res_path = NULL;
31 res_path = app_get_resource_path();
32 if (res_path == NULL) {
33 __E("failed to get resource path.");
37 snprintf(res_path_buff, PATH_MAX, "%s%s", res_path, file_name);
40 return &res_path_buff[0];