Rizin
unix-like reverse engineering framework and cli tools
rz_path.h
Go to the documentation of this file.
1 #ifndef RZ_UTIL_PATH_H_
2 #define RZ_UTIL_PATH_H_
3 
4 #include <rz_types.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 RZ_API void rz_path_set_prefix(RZ_NONNULL const char *path);
11 RZ_API RZ_OWN char *rz_path_prefix(RZ_NULLABLE const char *path);
12 RZ_API RZ_OWN char *rz_path_incdir(void);
13 RZ_API RZ_OWN char *rz_path_bindir(void);
14 RZ_API RZ_OWN char *rz_path_libdir(void);
15 
16 RZ_API RZ_OWN char *rz_path_system(RZ_NULLABLE const char *path);
18 RZ_API RZ_OWN char *rz_path_home(RZ_NULLABLE const char *path);
19 
20 RZ_API RZ_OWN char *rz_path_system_rc(void);
21 RZ_API RZ_OWN char *rz_path_home_rc(void);
25 RZ_API RZ_OWN char *rz_path_home_cache(void);
27 
29 
30 RZ_API RZ_OWN char *rz_path_realpath(RZ_NULLABLE const char *path);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif
#define RZ_API
static static fork const void static count static fd const char const char static newpath const char static path const char path
Definition: sflib.h:35
RZ_API RZ_OWN char * rz_path_home_config(void)
Return the home directory for config files (e.g. ~/.config/rizin)
Definition: path.c:198
RZ_API RZ_OWN char * rz_path_system_rc(void)
Return the system path of the global rizinrc file.
Definition: path.c:169
RZ_API RZ_OWN char * rz_path_incdir(void)
Return the directory where include files are placed.
Definition: path.c:141
RZ_API RZ_OWN char * rz_path_home_expand(RZ_NULLABLE const char *path)
Return a new path with the ~ char expanded to the home directory.
Definition: path.c:268
RZ_API RZ_OWN char * rz_path_home_config_rc(void)
Return the path of the rizinrc file in the home config directory.
Definition: path.c:226
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
Definition: path.c:182
RZ_API RZ_OWN char * rz_path_system(RZ_NULLABLE const char *path)
Return the full system path of the given subpath path.
Definition: path.c:162
RZ_API RZ_OWN char * rz_path_home_cache(void)
Return the home directory for cache files (e.g. ~/.cache/rizin)
Definition: path.c:205
RZ_API RZ_OWN char * rz_path_home_history(void)
Return the path for the command history file.
Definition: path.c:212
RZ_API void rz_path_set_prefix(RZ_NONNULL const char *path)
Return path prefixed by the Rizin install prefix.
Definition: path.c:97
RZ_API RZ_OWN char * rz_path_libdir(void)
Return the directory where the Rizin libraries are placed.
Definition: path.c:155
RZ_API RZ_OWN char * rz_path_bindir(void)
Return the directory where the Rizin binaries are placed.
Definition: path.c:148
RZ_API RZ_OWN char * rz_path_realpath(RZ_NULLABLE const char *path)
Return a canonicalized absolute path. Expands all symbolic links and resolves references to /....
Definition: path.c:290
RZ_API RZ_OWN char * rz_path_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the Rizin install prefix.
Definition: path.c:121
RZ_API RZ_OWN char * rz_path_home_config_rcdir(void)
Return the home directory of config rizinrc.d.
Definition: path.c:233
RZ_API RZ_OWN char * rz_path_home_rc(void)
Return the path of the rizinrc file in the home directory.
Definition: path.c:219
RZ_API RZ_OWN char * rz_path_home(RZ_NULLABLE const char *path)
Return a new path relative to the home directory.
Definition: path.c:243
#define RZ_NULLABLE
Definition: rz_types.h:65
#define RZ_OWN
Definition: rz_types.h:62
#define RZ_NONNULL
Definition: rz_types.h:64