GnuCash  4.11-137-g155922540d+
gnc-filepath-utils.h
Go to the documentation of this file.
1 /********************************************************************\
2  * gnc-filepath-utils.h -- file path resolution utilities *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License*
15  * along with this program; if not, contact: *
16  * *
17  * Free Software Foundation Voice: +1-617-542-5942 *
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19  * Boston, MA 02110-1301, USA gnu@gnu.org *
20 \********************************************************************/
21 
29 #ifndef GNC_FILEPATH_UTILS_H
30 #define GNC_FILEPATH_UTILS_H
31 
42 gchar *gnc_resolve_file_path (const gchar *filefrag);
43 
50 gchar *gnc_file_path_relative_part (const gchar *prefix, const gchar *path);
51 
59 gchar *gnc_file_path_absolute (const gchar *prefix, const gchar *relative);
60 
93 gchar *gnc_path_find_localized_html_file (const gchar *file_name);
94 
105 char * gnc_filepath_init (void);
106 
107 const gchar *gnc_userdata_dir (void);
108 gchar *gnc_build_userdata_path (const gchar *filename);
109 gchar *gnc_build_userconfig_path (const gchar *filename);
110 gchar *gnc_build_book_path (const gchar *filename);
111 gchar *gnc_build_translog_path (const gchar *filename);
112 gchar *gnc_build_data_path (const gchar *filename);
113 gchar *gnc_build_scm_path (const gchar *filename);
114 gchar *gnc_build_report_path (const gchar *filename);
115 gchar *gnc_build_reports_path (const gchar *dirname);
116 gchar *gnc_build_stdreports_path (const gchar *filename);
117 
118 const gchar *gnc_userconfig_dir (void);
119 
131 gchar *gnc_filepath_locate_pixmap (const gchar *name);
132 
133 
145 gchar *gnc_filepath_locate_data_file (const gchar *name);
146 
147 
159 gchar *gnc_filepath_locate_ui_file (const gchar *name);
160 
161 
173 gchar *gnc_filepath_locate_doc_file (const gchar *name);
174 
175 typedef struct
176 {
177  const gchar *env_name;
178  const gchar *env_path;
179  gboolean modifiable;
180 } EnvPaths;
181 
182 
191 GList *gnc_list_all_paths (void);
192 
193 #endif /* GNC_FILEPATH_UTILS_H */
gchar * gnc_filepath_locate_data_file(const gchar *name)
Given a file name, find the file in the directories associated with this application.
gchar * gnc_build_reports_path(const gchar *dirname)
Make a path to dirname in the reports directory.
gchar * gnc_build_book_path(const gchar *filename)
Make a path to filename in the book subdirectory of the user's configuration directory.
gchar * gnc_file_path_absolute(const gchar *prefix, const gchar *relative)
Given a prefix and a relative path, return the absolute path.
gchar * gnc_build_userdata_path(const gchar *filename)
Make a path to filename in the user's gnucash data directory.
gchar * gnc_build_data_path(const gchar *filename)
Make a path to filename in the data subdirectory of the user's configuration directory.
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.
const gchar * gnc_userdata_dir(void)
Ensure that the user's configuration directory exists and is minimally populated. ...
gchar * gnc_resolve_file_path(const gchar *filefrag)
The gnc_resolve_file_path() routine is a utility that will accept a fragmentary filename as input...
gchar * gnc_build_stdreports_path(const gchar *filename)
Make a path to filename in the standard reports directory.
gchar * gnc_build_scm_path(const gchar *filename)
Make a path to filename in the scm directory.
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...
gchar * gnc_build_report_path(const gchar *filename)
Make a path to filename in the report directory.
char * gnc_filepath_init(void)
Initializes the gnucash user data directory.
gchar * gnc_file_path_relative_part(const gchar *prefix, const gchar *path)
Given a prefix and a path return the relative portion of the path.
gchar * gnc_filepath_locate_pixmap(const gchar *name)
Given a pixmap/pixbuf file name, find the file in the pixmap directory associated with this applicati...
gchar * gnc_build_translog_path(const gchar *filename)
Make a path to filename in the translog subdirectory of the user's configuration directory.
GList * gnc_list_all_paths(void)
Returns a GList* of the environment variables used by GnuCash.
gchar * gnc_build_userconfig_path(const gchar *filename)
Make a path to filename in the user's configuration directory.
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...
const gchar * gnc_userconfig_dir(void)
Return the user's config directory for gnucash.