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
18 extern "C" {
19 #endif
20 
21 
22 ssize_t
23 u_file_get_config_dir(char *out_path, size_t out_path_size);
24 
25 ssize_t
26 u_file_get_path_in_config_dir(const char *suffix, char *out_path, size_t out_path_size);
27 
28 FILE *
29 u_file_open_file_in_config_dir(const char *filename, const char *mode);
30 
31 FILE *
32 u_file_open_file_in_config_dir_subpath(const char *subpath, const char *filename, const char *mode);
33 
34 ssize_t
35 u_file_get_hand_tracking_models_dir(char *out_path, size_t out_path_size);
36 
37 ssize_t
38 u_file_get_runtime_dir(char *out_path, size_t out_path_size);
39 
40 char *
41 u_file_read_content(FILE *file);
42 
43 char *
44 u_file_read_content_from_path(const char *path);
45 
46 ssize_t
47 u_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.