Gnome Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <gnome.h> #define PATH_SEP #define PATH_SEP_STR char* gnome_libdir_file (const char *filename); char* gnome_datadir_file (const char *filename); char* gnome_sound_file (const char *filename); char* gnome_pixmap_file (const char *filename); char* gnome_config_file (const char *filename); char* gnome_unconditional_libdir_file (const char *filename); char* gnome_unconditional_datadir_file (const char *filename); char* gnome_unconditional_sound_file (const char *filename); char* gnome_unconditional_pixmap_file (const char *filename); char* gnome_unconditional_config_file (const char *filename); int g_file_test (const char *filename, int test); int g_file_exists (const char *filename); #define g_copy_strings const char* g_unix_error_string (int error_num); char* g_concat_dir_and_file (const char *dir, const char *file); #define g_filename_index (path) #define g_filename_pointer const char* g_extension_pointer (const char *path); char** g_copy_vector (char **vec); #define g_flatten_vector #define gnome_util_user_home () #define gnome_util_prepend_user_home (x) #define gnome_util_home_file (afile) char* gnome_util_user_shell (void); gboolean g_is_image_filename (const char *path); |
#define PATH_SEP '/' |
A int macro that represents the character used as the path separator in this operating system
#define PATH_SEP_STR "/" |
A char * string that represents the character used as the path separator in this operating system. This comes in string fashion.
char* gnome_libdir_file (const char *filename); |
Locates a shared file either in the GNOMEDIR tree, the GNOME installation directory or in the current directory
filename : | filename to locate in libdir |
Returns : | a newly allocated pathname pointing to a file in the gnome libdir or NULL if the file does not exist. |
char* gnome_datadir_file (const char *filename); |
Locates a shared file either in the GNOMEDIR tree, the GNOME installation directory or in the current directory
filename : | shared filename to locate |
Returns : | a newly allocated pathname pointing to a file in the gnome sharedir or NULL if the file does not exist. |
char* gnome_sound_file (const char *filename); |
Locates a sound file either in the GNOMEDIR tree, the GNOME installation directory or in the current directory
filename : | sound filename to locate. |
Returns : | a newly allocated pathname pointing to a file in the gnome sound directory or NULL if the file does not exist. |
char* gnome_pixmap_file (const char *filename); |
filename : | pixmap filename |
Returns : | a newly allocated filename from the GNOMEDIR tree or from the GNOME installation directory for the pixmap directory ($prefix/share/pixmaps), or NULL if the file does not exist. |
char* gnome_config_file (const char *filename); |
Locates a configuration file ($prefix/etc) in the GNOMEDIR tree, the GNOME installation direcory or the current directory.
filename : | config filename |
Returns : | a newly allocated filename from the GNOMEDIR tree or from the GNOME installation directory |
char* gnome_unconditional_libdir_file (const char *filename); |
filename : | library filename |
Returns : | a newly allocated pathname pointing to a (possibly non-existent) file from the GNOMEDIR tree or from the GNOME installation directory |
char* gnome_unconditional_datadir_file (const char *filename); |
filename : | datadir filename |
Returns : | a newly allocated pathname pointing to a (possibly non-existent) file from the GNOMEDIR tree or from the GNOME installation directory |
char* gnome_unconditional_sound_file (const char *filename); |
filename : | sound filename |
Returns : | a newly allocated filename from the GNOMEDIR tree or from the GNOME installation directory |
char* gnome_unconditional_pixmap_file (const char *filename); |
filename : | pixmap filename |
Returns : | a newly allocated filename from the GNOMEDIR tree or from the GNOME installation directory for the pixmap directory ($prefix/share/pixmaps) |
char* gnome_unconditional_config_file (const char *filename); |
filename : | configuration filename |
Returns : | a newly allocated filename pointing to a (possibly non-existent) file from the GNOMEDIR tree or from the GNOME installation directory for the configuration directory ($prefix/etc). |
int g_file_test (const char *filename, int test); |
test is one of: G_FILE_TEST_ISFILE, to check if the pathname is a file G_FILE_TEST_ISLINK, to check if the pathname is a symlink G_FILE_TEST_ISDIR, to check if the pathname is a directory
filename : | filename to test |
test : | test to perform on the file |
Returns : | true if filename passes the specified test (an or expression of tests) |
int g_file_exists (const char *filename); |
filename : | pathname to test for existance. |
Returns : | true if filename exists left in for binary compatibility for a while FIXME: remove |
const char* g_unix_error_string (int error_num); |
error_num : | The errno number. |
Returns : | a pointer to a static buffer containing the description of the error reported by the errno. |
char* g_concat_dir_and_file (const char *dir, const char *file); |
dir : | directory name |
file : | filename. |
Returns : | a new allocated string that is the concatenation of dir and file, takes care of the exact details for concatenating them. |
#define gnome_util_prepend_user_home(x) |
Deprecated. Use g_get_home_dir() and g_concat_dir_and_file().
char* gnome_util_user_shell (void); |
Get the user's shell.
Returns : | a newly allocated string that is the path to the user's preferred shell. |
gboolean g_is_image_filename (const char *path); |
Deprecated. Extra lame way of figuring if a filename is an image file. You should use the gnome_mime functions instead and match against "image/".
Deprecated. Use gnome-mime stuff instead.