2020-04-06 10:08:48 +00:00
|
|
|
// Copyright 2019-2020, Collabora, Ltd.
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
/*!
|
|
|
|
* @file
|
|
|
|
* @brief Very simple file opening functions.
|
|
|
|
* @author Jakob Bornecrantz <jakob@collabora.com>
|
|
|
|
* @ingroup aux_util
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "xrt/xrt_compiler.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
ssize_t
|
|
|
|
u_file_get_config_dir(char *out_path, size_t out_path_size);
|
|
|
|
|
|
|
|
ssize_t
|
2021-01-14 14:13:48 +00:00
|
|
|
u_file_get_path_in_config_dir(const char *suffix, char *out_path, size_t out_path_size);
|
2020-04-06 10:08:48 +00:00
|
|
|
|
|
|
|
FILE *
|
|
|
|
u_file_open_file_in_config_dir(const char *filename, const char *mode);
|
|
|
|
|
2020-10-21 18:48:54 +00:00
|
|
|
ssize_t
|
|
|
|
u_file_get_runtime_dir(char *out_path, size_t out_path_size);
|
|
|
|
|
2021-02-17 00:38:44 +00:00
|
|
|
char *
|
|
|
|
u_file_read_content(FILE *file);
|
2020-04-06 10:08:48 +00:00
|
|
|
|
2020-10-21 18:48:54 +00:00
|
|
|
ssize_t
|
|
|
|
u_file_get_path_in_runtime_dir(const char *filename, char *out_path, size_t out_path_size);
|
|
|
|
|
2020-04-06 10:08:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|