|
girara
|
Go to the source code of this file.
Enumerations | |
| enum | girara_xdg_path_t { XDG_CONFIG , XDG_DATA , XDG_CONFIG_DIRS , XDG_DATA_DIRS , XDG_CACHE } |
Functions | |
| char * | girara_get_home_directory (const char *user) GIRARA_VISIBLE |
| char * | girara_get_xdg_path (girara_xdg_path_t path) GIRARA_VISIBLE |
| bool | girara_xdg_open (const char *uri) GIRARA_VISIBLE |
| bool | girara_xdg_open_with_working_directory (const char *uri, const char *working_directory) GIRARA_VISIBLE |
| char * | girara_fix_path (const char *path) GIRARA_VISIBLE |
| char * | girara_escape_string (const char *value) GIRARA_VISIBLE |
| char * | girara_replace_substring (const char *string, const char *old, const char *new) GIRARA_VISIBLE |
| const char * | girara_version (void) GIRARA_VISIBLE |
| enum girara_xdg_path_t |
| char * girara_escape_string | ( | const char * | value | ) |
Escape \, \t, ", ' and spaces in strings.
| value | The string to be escaped. |
| char * girara_fix_path | ( | const char * | path | ) |
Returns a "fixed" version of path. Which means, it will be an absolute path and fully expanded. ~ and ~user will be replaced by the current user's home directory (user's home directory respectively).
| path | the path to "fix". |
| char * girara_get_home_directory | ( | const char * | user | ) |
Returns the home directory for the given user. $HOME is preferred over the value from g_get_home_dir.
| user | a username or NULL to get home directory of the current user. |
| char * girara_get_xdg_path | ( | girara_xdg_path_t | path | ) |
Returns a specific path specified in the XDG specification. ~ in paths will not be expanded.
| path | which path to get |
| char * girara_replace_substring | ( | const char * | string, |
| const char * | old, | ||
| const char * | new ) |
Replaces all occurrences of old in string with new and returns a new allocated string
| string | The original string |
| old | String to replace |
| new | Replacement string |
| const char * girara_version | ( | void | ) |
Return version of girara.
| bool girara_xdg_open | ( | const char * | uri | ) |
Opens a URI with xdg-open. If xdg-open is not available, it falls back to the equivalent of gio open.
| uri | the URI to be opened. |
| bool girara_xdg_open_with_working_directory | ( | const char * | uri, |
| const char * | working_directory ) |
Opens a URI with xdg-open in a different working directory. If xdg-open is not available, it falls back to the equivalent of gio open.
| uri | the URI to be opened. |
| working_directory | working directory |