Monado OpenXR Runtime
u_file.h
Go to the documentation of this file.
1// Copyright 2019-2020, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Very simple file opening functions.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup aux_util
8 */
9
10#pragma once
11
12#include "xrt/xrt_compiler.h"
13
14#include <stdio.h>
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22ssize_t
23u_file_get_config_dir(char *out_path, size_t out_path_size);
24
25ssize_t
26u_file_get_path_in_config_dir(const char *suffix, char *out_path, size_t out_path_size);
27
28FILE *
29u_file_open_file_in_config_dir(const char *filename, const char *mode);
30
31FILE *
32u_file_open_file_in_config_dir_subpath(const char *subpath, const char *filename, const char *mode);
33
34ssize_t
35u_file_get_hand_tracking_models_dir(char *out_path, size_t out_path_size);
36
37ssize_t
38u_file_get_runtime_dir(char *out_path, size_t out_path_size);
39
40char *
41u_file_read_content(FILE *file);
42
43char *
44u_file_read_content_from_path(const char *path);
45
46ssize_t
47u_file_get_path_in_runtime_dir(const char *suffix, char *out_path, size_t out_path_size);
48
49#ifdef __cplusplus
50}
51#endif
Header holding common defines.