### Enumeration

# GLib FileError

#### Declaration

    error-domain GLib.FileError

#### Description

Values corresponding to `errno` codes returned from file operations on UNIX. Unlike `errno` codes, GFileError values are available on all systems, even Windows. The exact meaning of each code depends on what sort of file operation you were performing; the UNIX documentation gives more details. The following error code descriptions come from the GNU C Library manual, and are under the copyright of that manual.

It’s not very portable to make detailed assumptions about exactly which errors will be returned from a given operation. Some errors don’t occur on some systems, etc., sometimes there are subtle differences in when a system will report a given error, etc.

#### Members

`G_FILE_ERROR_EXIST`

  Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.

  - Value: `0`
  - Available since: 2.0
`G_FILE_ERROR_ISDIR`

  File is a directory; you cannot open a directory for writing, or create or remove hard links to it.

  - Value: `1`
  - Available since: 2.0
`G_FILE_ERROR_ACCES`

  Permission denied; the file permissions do not allow the attempted operation.

  - Value: `2`
  - Available since: 2.0
`G_FILE_ERROR_NAMETOOLONG`

  Filename too long.

  - Value: `3`
  - Available since: 2.0
`G_FILE_ERROR_NOENT`

  No such file or directory. This is a “file doesn’t exist” error for ordinary files that are referenced in contexts where they are expected to already exist.

  - Value: `4`
  - Available since: 2.0
`G_FILE_ERROR_NOTDIR`

  A file that isn’t a directory was specified when a directory is required.

  - Value: `5`
  - Available since: 2.0
`G_FILE_ERROR_NXIO`

  No such device or address. The system tried to use the device represented by a file you specified, and it couldn’t find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or not correctly attached to the computer.

  - Value: `6`
  - Available since: 2.0
`G_FILE_ERROR_NODEV`

  The underlying file system of the specified file does not support memory mapping.

  - Value: `7`
  - Available since: 2.0
`G_FILE_ERROR_ROFS`

  The directory containing the new link can’t be modified because it’s on a read-only file system.

  - Value: `8`
  - Available since: 2.0
`G_FILE_ERROR_TXTBSY`

  Text file busy.

  - Value: `9`
  - Available since: 2.0
`G_FILE_ERROR_FAULT`

  You passed in a pointer to bad memory. (GLib won’t reliably return this, don’t pass in pointers to bad memory.).

  - Value: `10`
  - Available since: 2.0
`G_FILE_ERROR_LOOP`

  Too many levels of symbolic links were encountered in looking up a file name. This often indicates a cycle of symbolic links.

  - Value: `11`
  - Available since: 2.0
`G_FILE_ERROR_NOSPC`

  No space left on device; write operation on a file failed because the disk is full.

  - Value: `12`
  - Available since: 2.0
`G_FILE_ERROR_NOMEM`

  No memory available. The system cannot allocate more virtual memory because its capacity is full.

  - Value: `13`
  - Available since: 2.0
`G_FILE_ERROR_MFILE`

  The current process has too many files open and can’t open any more. Duplicate descriptors do count toward this limit.

  - Value: `14`
  - Available since: 2.0
`G_FILE_ERROR_NFILE`

  There are too many distinct file openings in the entire system.

  - Value: `15`
  - Available since: 2.0
`G_FILE_ERROR_BADF`

  Bad file descriptor; for example, I/O on a descriptor that has been closed or reading from a descriptor open only for writing (or vice versa).

  - Value: `16`
  - Available since: 2.0
`G_FILE_ERROR_INVAL`

  Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function.

  - Value: `17`
  - Available since: 2.0
`G_FILE_ERROR_PIPE`

  Broken pipe; there is no process reading from the other end of a pipe. Every library function that returns this error code also generates a ‘SIGPIPE’ signal; this signal terminates the program if not handled or blocked. Thus, your program will never actually see this code unless it has handled or blocked ‘SIGPIPE’.

  - Value: `18`
  - Available since: 2.0
`G_FILE_ERROR_AGAIN`

  Resource temporarily unavailable; the call might work if you try again later.

  - Value: `19`
  - Available since: 2.0
`G_FILE_ERROR_INTR`

  Interrupted function call; an asynchronous signal occurred and prevented completion of the call. When this happens, you should try the call again.

  - Value: `20`
  - Available since: 2.0
`G_FILE_ERROR_IO`

  Input/output error; usually used for physical read or write errors. i.e. the disk or other physical device hardware is returning errors.

  - Value: `21`
  - Available since: 2.0
`G_FILE_ERROR_PERM`

  Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.

  - Value: `22`
  - Available since: 2.0
`G_FILE_ERROR_NOSYS`

  Function not implemented; this indicates that the system is missing some functionality.

  - Value: `23`
  - Available since: 2.0
`G_FILE_ERROR_FAILED`

  Does not correspond to a UNIX error code; this is the standard “failed for unspecified reason” error code present in all `GError` error code enumerations. Returned if no specific code applies.

  - Value: `24`
  - Available since: 2.0