Add function to create an absolute file path

Add function to create an absolute file path from a prefix path and a
relative one. If the prefix is null, then the root directory of the
current path is used.
This commit is contained in:
Robert Fewell
2019-03-29 17:33:26 +00:00
parent 2527724219
commit 22a7a05d50
2 changed files with 39 additions and 0 deletions

View File

@@ -49,6 +49,15 @@ gchar *gnc_resolve_file_path (const gchar *filefrag);
*/
gchar *gnc_file_path_relative_part (const gchar *prefix, const gchar *path);
/** Given a prefix and a relative path, return the absolute path.
* @param prefix The prefix that is the head of the path
* @param relative The path to add to the prefix to form an absolute path
* @return a char* that must be g_freed containing the absolute path.
*
* If prefix is null, then the gnc_userdata_home is used as the prefix.
*/
gchar *gnc_file_path_absolute (const gchar *prefix, const gchar *relative);
/** @brief Find an absolute path to a localized version of a given
* relative path to a html or html related file.
* If no localized version exists, an absolute path to the file