Valadoc | Vala | Tutorial | API-References | Markup

error_from_errno


Description:

public int error_from_errno (int err_no)

Gets a GFileError constant based on the passed-in errno.

For example, if you pass in EEXIST this function returns G_FILE_ERROR_EXIST. Unlike errno values, you can portably assume that all GFileError values will exist.

Normally a GFileError value goes into a GError returned from a function that manipulates files. So you would use g_file_error_from_errno() when constructing a GError.

Parameters:

err_no an "errno" value

Returns:

GFileError corresponding to the given errno

Namespace: GLib.FileUtils
Package: glib-2.0