GnuCash
2.6.99
|
File path resolution utility functions. More...
Go to the source code of this file.
Functions | |
gchar * | gnc_resolve_file_path (const gchar *filefrag) |
Create an absolute path when given a relative path; otherwise return the argument. More... | |
gchar * | gnc_path_find_localized_html_file (const gchar *file_name) |
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 is searched for. If that file doesn't exist either, returns NULL. More... | |
const gchar * | gnc_dotgnucash_dir (void) |
Ensure that the user's configuration directory exists and is minimally populated. More... | |
gchar * | gnc_build_dotgnucash_path (const gchar *filename) |
Make a path to filename in the user's configuration directory. More... | |
gchar * | gnc_build_book_path (const gchar *filename) |
Make a path to filename in the book subdirectory of the user's configuration directory. More... | |
gchar * | gnc_build_translog_path (const gchar *filename) |
Make a path to filename in the translog subdirectory of the user's configuration directory. More... | |
gchar * | gnc_build_data_path (const gchar *filename) |
Make a path to filename in the data subdirectory of the user's configuration directory. More... | |
gchar * | gnc_build_report_path (const gchar *filename) |
Make a path to filename in the report directory. More... | |
gchar * | gnc_build_stdreports_path (const gchar *filename) |
Make a path to filename in the standard reports directory. More... | |
gchar * | gnc_filepath_locate_pixmap (const gchar *name) |
gchar * | gnc_filepath_locate_data_file (const gchar *name) |
gchar * | gnc_filepath_locate_ui_file (const gchar *name) |
gchar * | gnc_filepath_locate_doc_file (const gchar *name) |
File path resolution utility functions.
Definition in file gnc-filepath-utils.h.
gchar* gnc_build_book_path | ( | const gchar * | filename | ) |
Make a path to filename in the book subdirectory of the user's configuration directory.
filename | The name of the file |
Definition at line 491 of file gnc-filepath-utils.c.
gchar* gnc_build_data_path | ( | const gchar * | filename | ) |
Make a path to filename in the data subdirectory of the user's configuration directory.
filename | The name of the file |
Definition at line 533 of file gnc-filepath-utils.c.
gchar* gnc_build_dotgnucash_path | ( | const gchar * | filename | ) |
Make a path to filename in the user's configuration directory.
filename | The name of the file |
Definition at line 477 of file gnc-filepath-utils.c.
gchar* gnc_build_report_path | ( | const gchar * | filename | ) |
Make a path to filename in the report directory.
filename | The name of the file |
Definition at line 553 of file gnc-filepath-utils.c.
gchar* gnc_build_stdreports_path | ( | const gchar * | filename | ) |
Make a path to filename in the standard reports directory.
filename | The name of the file |
Definition at line 568 of file gnc-filepath-utils.c.
gchar* gnc_build_translog_path | ( | const gchar * | filename | ) |
Make a path to filename in the translog subdirectory of the user's configuration directory.
filename | The name of the file |
Definition at line 512 of file gnc-filepath-utils.c.
const gchar* gnc_dotgnucash_dir | ( | void | ) |
Ensure that the user's configuration directory exists and is minimally populated.
Note that the default path is $HOME/.gnucash; This can be changed by the environment variable $GNC_DOT_DIR.
Definition at line 413 of file gnc-filepath-utils.c.
gchar* gnc_filepath_locate_data_file | ( | const gchar * | name | ) |
Given a file name, find the file in the directories associated with this application. This routine will display an error message if it can't find the file.
name | The name of the file to be found. |
Definition at line 599 of file gnc-filepath-utils.c.
gchar* gnc_filepath_locate_doc_file | ( | const gchar * | name | ) |
Given a documentation file name, find the file in the doc directory associated with this application. This routine will display an error message if it can't find the file.
name | The name of the file to be found. |
Definition at line 631 of file gnc-filepath-utils.c.
gchar* gnc_filepath_locate_pixmap | ( | const gchar * | name | ) |
Given a pixmap/pixbuf file name, find the file in the pixmap directory associated with this application. This routine will display an error message if it can't find the file.
name | The name of the file to be found. |
Definition at line 605 of file gnc-filepath-utils.c.
gchar* gnc_filepath_locate_ui_file | ( | const gchar * | name | ) |
Given a ui file name, find the file in the ui directory associated with this application. This routine will display an error message if it can't find the file.
name | The name of the file to be found. |
Definition at line 618 of file gnc-filepath-utils.c.
gchar* gnc_path_find_localized_html_file | ( | const gchar * | file_name | ) |
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 is searched for. If that file doesn't exist either, returns NULL.
If passed a string which g_path_is_absolute declares an absolute path, return the argument.
Otherwise, assume that file_name is a well-formed relative path and try to find a file with its path relative to
The paths are searched for in that order. If a matching file is found, return the absolute path to it.
If one isn't found, return NULL.
file_name | The file path to resolve |
If passed a string which g_path_is_absolute declares an absolute path, return the argument.
Otherwise, assume that file_name is a well-formed relative path and try to find a file with its path relative to
The paths are searched for in that order. If a matching file is found, return the absolute path to it.
If one isn't found, return NULL.
file_name | The file path to resolve |
Definition at line 262 of file gnc-filepath-utils.c.
gchar* gnc_resolve_file_path | ( | const gchar * | filefrag | ) |
Create an absolute path when given a relative path; otherwise return the argument.
The gnc_resolve_file_path() routine is a utility that will accept a fragmentary filename as input, and resolve it into a fully qualified path in the file system, i.e. a path that begins with a leading slash. First, the current working directory is searched for the file. Next, the directory $HOME/.gnucash/data, and finally, a list of other (configurable) paths. If the file is not found, then the path $HOME/.gnucash/data is used. If $HOME is not defined, then the current working directory is used.
If passed a string which g_path_is_absolute declares an absolute path, return the argument.
Otherwise, assume that filefrag is a well-formed relative path and try to find a file with its path relative to
The paths are searched for in that order. If a matching file is found, return the absolute path to it.
If one isn't found, return a absolute path relative to the user's configuration directory and note in the trace file that it needs to be created.
filefrag | The file path to resolve |
Definition at line 124 of file gnc-filepath-utils.c.