| 1 |
/// @file |
| 2 |
/// @brief platform abstraction for finding the path to yourself |
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <util/api.h> |
| 7 |
|
| 8 |
#ifdef __cplusplus |
| 9 |
extern "C" { |
| 10 |
#endif |
| 11 |
|
| 12 |
/// find an absolute path to the current executable |
| 13 |
/// |
| 14 |
/// The caller is responsible for freeing the returned pointer. |
| 15 |
/// |
| 16 |
/// It is assumed the containing executable is an on-disk file. If it is an |
| 17 |
/// in-memory executable with no actual path, results are undefined. |
| 18 |
/// |
| 19 |
/// @return An absolute path to the containing executable on success or `NULL` |
| 20 |
/// on failure |
| 21 |
UTIL_API char *gv_find_me(void); |
| 22 |
|
| 23 |
#ifdef __cplusplus |
| 24 |
} |
| 25 |
#endif |