Converts errno.h error codes into GIO error codes.
The fallback value gio.types.IOErrorEnum.Failed is returned for error codes not
currently handled (but note that future GLib releases may return a more
specific value instead).
As errno is global and may be modified by intermediate function
calls, you should save its value immediately after the call returns,
and use the saved value instead of errno:
Converts errno.h error codes into GIO error codes.
The fallback value gio.types.IOErrorEnum.Failed is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).
As errno is global and may be modified by intermediate function calls, you should save its value immediately after the call returns, and use the saved value instead of errno: