#include "rox-clib.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <glib.h>
#include "choices.h"
#include "basedir.h"
Functions | |
void | choices_init (void) |
GPtrArray * | choices_list_dirs (const char *dir) |
void | choices_free_list (GPtrArray *list) |
gchar * | choices_find_path_load (const char *leaf, const char *dir) |
gchar * | choices_find_path_save (const char *leaf, const char *dir, gboolean create) |
gchar * | rox_choices_save (const char *leaf, const char *dir, const char *domain) |
gchar * | rox_choices_load (const char *leaf, const char *dir, const char *domain) |
GPtrArray * | rox_choices_list_dirs (const char *domain, const char *dir) |
void | rox_choices_free_list (GPtrArray *list) |
The current versions use a parameter "domain" to ensure that two programs from different sources but with the same name do not clash. domain is optional and may be NULL. If given it should be a domain name identifying the software, i.e. I use kerofin.demon.co.uk. If you don't have a domain name, use an email address, e.g. me@my-isp.org
These functions are deprecated and should not be used in new code:
|
Get the pathname of a choices file to load. Eg: choices_find_path_load("menus", "ROX-Filer") -> "/usr/local/share/Choices/ROX-Filer/menus". The return values may be NULL - use built-in defaults - otherwise g_free() the result.
|
|
Returns the pathname of a file to save to, or NULL if saving is disabled. If 'create' is TRUE then intermediate directories will be created (set this to FALSE if you just want to find out where a saved file would go without actually altering the filesystem). g_free() the result.
|
|
Free the data returned by choices_list_dirs().
|
|
Checks $CHOICESPATH to construct the directory list table for the old choices_system. You must call this before using any other choices_* functions. If the environment variable does not exist then the defaults are used.
|
|
Returns an array of the directories in CHOICESPATH which contain a subdirectory called 'dir'. Lower-indexed results should override higher-indexed ones. Free the list using choices_free_list().
|
|
Free the data returned by rox_choices_list_dirs().
|
|
Returns an array of the directories in XDG_CONFIG_DIRS which contain a subdirectory called 'domain/dir'. Lower-indexed results should override higher-indexed ones. Free the list using rox_choices_free_list().
|
|
Get the pathname of a choices file to load. Eg:
The return values may be NULL - use built-in defaults - otherwise g_free() the result. This uses rox_basedir_load_config_path(), falling back on choices_find_path_load() if that does not return a result.
|
|
Returns the pathname of a file to save to, or NULL if saving is disabled. g_free() the result.
|