31 #ifndef FILE_FUNCTIONS_H_ 32 #define FILE_FUNCTIONS_H_ 46 #define DIRECTORY_SEPARATOR '\\' 48 #define DIRECTORY_SEPARATOR '/' 72 #define PATH_SEPARATOR ';' 74 #define PATH_SEPARATOR ':' 89 truepath(
const gchar *path, gchar *resolved_path);
123 #define FILE_MODE_EXIST 1<<4 124 #define FILE_MODE_DIRECTORY 1<<3 125 #define FILE_MODE_READ 1<<2 126 #define FILE_MODE_WRITE 1<<1 127 #define FILE_MODE_EXECUTE 1 147 gboolean filename_meets_accessMode(const gchar *filename, guint access_mode_mask); 249 (
const gchar *filename_default, guint filename_len,
StringList *extensions,
250 guint access_mode_mask,
const gchar * prompt, gpointer option,
ChooseFilenameFunc callback);
gchar * filename_search_paths_mode(const gchar *filename, const gchar *search_paths, guint access_mode_mask)
Find a file with specified access mode from the search path.
gchar * filename_choose(const gchar *filename_default, guint filename_len, StringList *extensions, guint access_mode_mask, const gchar *prompt, gpointer option, ChooseFilenameFunc callback)
Choose a suitable filename if default one is not.
StringList is a structure that stores a list of constant strings.
Definition: str_functions.h:47
String processing functions.
gchar * truepath(const gchar *path, gchar *resolved_path)
Return the canonicalized absolute pathname.
gboolean isReadable(const gchar *filename)
Whether the file is readable.
TaskStatus(* ChooseFilenameFunc)(gchar *filename_buf, guint filename_len, StringList *extensions, guint access_mode_mask, const gchar *prompt, gpointer option)
Prototype of callback function for choosing a filename.
Definition: file_functions.h:219
gchar * filename_search_paths(const gchar *filename, const gchar *search_paths)
Find a file from the search path.
< The task is canceled.
Definition: file_functions.h:60
gboolean isWritable(const gchar *filename)
Whether the file is writable.
< The task is failed.
Definition: file_functions.h:61
< The task is still running, usually this for concurrent process.
Definition: file_functions.h:59
TaskStatus
An enumeration of task running status.
Definition: file_functions.h:57