UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
fs.h
Go to the documentation of this file.
1
6/*
7 * Copyright (c) 2018-2023 CESNET, z. s. p. o.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, is permitted provided that the following conditions
12 * are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 *
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * 3. Neither the name of CESNET nor the names of its contributors may be
22 * used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
27 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
28 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
29 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
30 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */
38
39#ifndef UTILS_FS_H_
40#define UTILS_FS_H_
41
42// maximal platform path length including terminating null byte
43#ifdef _WIN32
44#include <windows.h>
45#define MAX_PATH_SIZE (MAX_PATH + 1)
46#else
47#include <limits.h>
48#define MAX_PATH_SIZE PATH_MAX
49#endif
50
51#ifdef __cplusplus
52#include <cstdio>
53extern "C" {
54#else
55#include <stdio.h>
56#endif
57
62int get_exec_path(char* path);
63const char *get_temp_dir(void);
64FILE *get_temp_file(const char **filename);
65const char *get_install_root(void);
66 char *strdup_path_with_expansion(const char *orig_path);
67
68#ifdef __cplusplus
69} // extern "C"
70#endif
71
72#endif// UTILS_FS_H_
73
char * strdup_path_with_expansion(const char *orig_path)
Definition fs.c:164
int get_exec_path(char *path)
const char * get_install_root(void)
Definition fs.c:116
const char * get_temp_dir(void)
Definition fs.c:56
FILE * get_temp_file(const char **filename)
Definition fs.c:145