* Boston, MA 02111-1307, USA.
*/
+#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__G_LIB_H__) && !defined (GLIB_COMPILATION)
+#error "Only <glib.h> can be included directly."
+#endif
+
#ifndef __G_FILEUTILS_H__
#define __G_FILEUTILS_H__
-#include <gerror.h>
+#include <glib/gerror.h>
G_BEGIN_DECLS
G_FILE_ERROR_INTR,
G_FILE_ERROR_IO,
G_FILE_ERROR_PERM,
+ G_FILE_ERROR_NOSYS,
G_FILE_ERROR_FAILED
} GFileError;
/* So other code can generate a GFileError */
GFileError g_file_error_from_errno (gint err_no);
+#ifdef G_OS_WIN32
+#define g_file_test g_file_test_utf8
+#define g_file_get_contents g_file_get_contents_utf8
+#define g_mkstemp g_mkstemp_utf8
+#define g_file_open_tmp g_file_open_tmp_utf8
+#endif
+
gboolean g_file_test (const gchar *filename,
GFileTest test);
gboolean g_file_get_contents (const gchar *filename,
gchar **contents,
- guint *length,
+ gsize *length,
GError **error);
-
+gboolean g_file_set_contents (const gchar *filename,
+ const gchar *contents,
+ gssize length,
+ GError **error);
+gchar *g_file_read_link (const gchar *filename,
+ GError **error);
/* Wrapper / workalike for mkstemp() */
-int g_mkstemp (char *tmpl);
+gint g_mkstemp (gchar *tmpl);
/* Wrapper for g_mkstemp */
-int g_file_open_tmp (const char *template,
- char **name_used,
+gint g_file_open_tmp (const gchar *tmpl,
+ gchar **name_used,
GError **error);
-G_END_DECLS
+char *g_format_size_for_display (goffset size);
-#endif /* __G_FILEUTILS_H__ */
+gchar *g_build_path (const gchar *separator,
+ const gchar *first_element,
+ ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+gchar *g_build_pathv (const gchar *separator,
+ gchar **args) G_GNUC_MALLOC;
+
+gchar *g_build_filename (const gchar *first_element,
+ ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+gchar *g_build_filenamev (gchar **args) G_GNUC_MALLOC;
+int g_mkdir_with_parents (const gchar *pathname,
+ int mode);
+G_END_DECLS
+
+#endif /* __G_FILEUTILS_H__ */