1#ifndef __C_ENV_UTILS_INCLUDE_ENV_UTILS_H__
2#define __C_ENV_UTILS_INCLUDE_ENV_UTILS_H__
13#define _ENVU_EXTERN extern
16#define _ENVU_EXTERN __declspec(dllexport) extern
18#define _ENVU_EXTERN __attribute__((visibility("default"))) extern
23#define _ENVU_ENUM(s) typedef unsigned int s; enum
26#define ENVU_VERSION "0.3.1"
27#define ENVU_VERSION_INT 301
_ENVU_EXTERN char * envuGetExecutablePath(void)
Gets the path to the executing binary.
_ENVU_EXTERN char ** envuGetEnvPaths(int *path_count)
Gets the environment paths from the PATH variable.
_ENVU_EXTERN char ** envuParseEnvPaths(const char *env_path, int *path_count)
Parses the PATH variable.
_ENVU_EXTERN int envuSetCwd(const char *path)
Sets the current working directory.
_ENVU_EXTERN char * envuGetRealPath(const char *path)
Gets a real path of the specified path.
_ENVU_EXTERN int envuSetEnv(const char *name, const char *value)
Sets an environment variable.
_ENVU_EXTERN int envuFileExists(const char *path)
Returns if the specified path is a regular file for not.
_ENVU_EXTERN char * envuGetHome(void)
Gets user's home directory.
_ENVU_EXTERN int envuPathExists(const char *path)
Returns if the specified path exists for not.
_ENVU_EXTERN const char * envuGetVersion(void)
Gets the version of c-env-utils.
_ENVU_EXTERN char * envuGetDirectory(const char *path)
Gets a parent directory of the specified path.
_ENVU_EXTERN char * envuGetFullPath(const char *path)
Gets a full path of the specified path.
_ENVU_EXTERN char * envuGetCwd(void)
Gets the current working directory.
_ENVU_EXTERN char * envuGetOSVersion(void)
Gets the version of running OS.
_ENVU_EXTERN void envuFree(void *p)
Frees the memory of a string allocated by c-env-utils.
_ENVU_EXTERN char * envuGetUsername(void)
Gets user name.
_ENVU_EXTERN void envuFreeEnvPaths(char **paths)
Frees the memory of an array allocated by envuGetEnvPaths() or envuParseEnvPaths().
_ENVU_EXTERN char * envuGetOSProductName(void)
Gets the product name and its version of running OS.
_ENVU_EXTERN char * envuGetEnv(const char *name)
Gets a value of an environment variable.
#define _ENVU_EXTERN
Definition: env_utils.h:18
_ENVU_EXTERN int envuGetVersionAsInt(void)
Gets the version of c-env-utils as an integer.
_ENVU_EXTERN char * envuGetExecutableDir(void)
Gets the directory of the executing binary.
_ENVU_EXTERN char * envuGetOS(void)
Gets the name of running OS.