gerror: Add an utility function to get the GIO Error from GFileError

When GIO functions are using GLib file utils functions we expect to
return a GIO Error, so provide a way to map such error values.
This commit is contained in:
Marco Trevisan (Treviño)
2022-06-14 19:45:53 +02:00
parent e5841beba6
commit b64fd312da
4 changed files with 133 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
#include <glib.h>
#include <gio/gioenums.h>
#include <glib/gfileutils.h>
G_BEGIN_DECLS
@@ -44,6 +45,8 @@ GLIB_AVAILABLE_IN_ALL
GQuark g_io_error_quark (void);
GLIB_AVAILABLE_IN_ALL
GIOErrorEnum g_io_error_from_errno (gint err_no);
GLIB_AVAILABLE_IN_2_74
GIOErrorEnum g_io_error_from_file_error (GFileError file_error);
#ifdef G_OS_WIN32
GLIB_AVAILABLE_IN_ALL