Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

basedir.c File Reference

XDG base directory functions for ROX-CLib. More...

#include "rox-clib.h"
#include <stdlib.h>
#include <glib.h>
#include "basedir.h"

Functions

const gchar * rox_basedir_get_config_home (void)
const gchar * basedir_get_config_home (void)
GList * rox_basedir_get_config_paths (void)
GList * basedir_get_config_paths (void)
gchar * rox_basedir_save_config_path (const char *resource, const char *leaf)
gchar * basedir_save_config_path (const char *resource, const char *leaf)
gchar * rox_basedir_save_data_path (const char *resource, const char *leaf)
gchar * basedir_save_data_path (const char *resource, const char *leaf)
gchar * rox_basedir_load_config_path (const char *resource, const char *leaf)
gchar * basedir_load_config_path (const char *resource, const char *leaf)
gchar * rox_basedir_load_data_path (const char *resource, const char *leaf)
gchar * basedir_load_data_path (const char *resource, const char *leaf)
GList * rox_basedir_load_config_paths (const char *resource, const char *leaf)
GList * basedir_load_config_paths (const char *resource, const char *leaf)
GList * rox_basedir_load_data_paths (const char *resource, const char *leaf)
GList * basedir_load_data_paths (const char *resource, const char *leaf)
void rox_basedir_free_paths (GList *paths)


Detailed Description

XDG base directory functions for ROX-CLib.

Author:
Stephen Watson
Version:
Id
basedir.c,v 1.4 2005/10/22 10:42:28 stephen Exp

Function Documentation

const gchar * basedir_get_config_home void   ) 
 

Returns:
The directory where the user may write configuration files.

Deprecated:
use rox_basedir_get_config_home()

GList * basedir_get_config_paths void   ) 
 

Returns:
A list of directories to be searched for configuration files. Free the list but not the directories.

Deprecated:
use rox_basedir_get_config_home()

gchar* basedir_load_config_path const char *  resource,
const char *  leaf
 

Return the full path to a file from which configuration may be loaded.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if no such file found.

Deprecated:
use rox_basedir_load_config_path().

GList* basedir_load_config_paths const char *  resource,
const char *  leaf
 

Return a list of full paths to a file from which configuration may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
List of full path to files, pass to rox_basedir_free_paths() when done, or NULL if no such file found.

Deprecated:
use rox_basedir_load_config_paths().

gchar* basedir_load_data_path const char *  resource,
const char *  leaf
 

Return the full path to a file from which data may be loaded.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if no such file found.

GList* basedir_load_data_paths const char *  resource,
const char *  leaf
 

Return a list of full paths to a file from which data may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
List of full path to files, pass to rox_basedir_free_paths() when done, or NULL if no such file found.

Deprecated:
use rox_basedir_load_data_paths().

gchar* basedir_save_config_path const char *  resource,
const char *  leaf
 

Return the full path to a file where configuration may be saved.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if saving has been disabled.

Deprecated:
use rox_basedir_save_config_path().

gchar* basedir_save_data_path const char *  resource,
const char *  leaf
 

Return the full path to a file where data may be saved. Normally this is not required.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if saving has been disabled.

Deprecated:
use rox_basedir_save_data_path().

void rox_basedir_free_paths GList *  paths  ) 
 

Free a list returned by basedir_load_config_paths() or basedir_load_data_paths().

Parameters:
[in,out] paths list of paths.

const gchar* rox_basedir_get_config_home void   ) 
 

Returns:
The directory where the user may write configuration files.

GList* rox_basedir_get_config_paths void   ) 
 

Returns:
A list of directories to be searched for configuration files. Free the list but not the directories.

gchar* rox_basedir_load_config_path const char *  resource,
const char *  leaf
 

Return the full path to a file from which configuration may be loaded.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if no such file found.

GList* rox_basedir_load_config_paths const char *  resource,
const char *  leaf
 

Return a list of full paths to a file from which configuration may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
List of full path to files, pass to rox_basedir_free_paths() when done, or NULL if no such file found.

gchar* rox_basedir_load_data_path const char *  resource,
const char *  leaf
 

Return the full path to a file from which data may be loaded.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if no such file found.

GList* rox_basedir_load_data_paths const char *  resource,
const char *  leaf
 

Return a list of full paths to a file from which data may be loaded in each diretory where it exists. Useful for merging the conents of multiple files..

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
List of full path to files, pass to rox_basedir_free_paths() when done, or NULL if no such file found.

gchar* rox_basedir_save_config_path const char *  resource,
const char *  leaf
 

Return the full path to a file where configuration may be saved.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if saving has been disabled

gchar* rox_basedir_save_data_path const char *  resource,
const char *  leaf
 

Return the full path to a file where data may be saved. Normally this is not required.

Parameters:
[in] resource Either the name of the program ("Clock") or the programmers domain and the name of the program as "kerofin.demon.co.uk/Clock"
[in] leaf Last part of file name, such as "alarms.xml".
Returns:
Full path to the file, pass to g_free() when done, or NULL if saving has been disabled


Generated on Sat Oct 22 17:49:13 2005 for ROX-CLib by doxygen 1.3.8