Enum Class FileError

java.lang.Object
java.lang.Enum<FileError>
org.gnome.glib.FileError
All Implemented Interfaces:
Serializable, Comparable<FileError>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum FileError extends Enum<FileError> implements Enumeration

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.

  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Permission denied; the file permissions do not allow the attempted operation.
    Resource temporarily unavailable; the call might work if you try again later.
    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).
    Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
    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.
    You passed in a pointer to bad memory.
    Interrupted function call; an asynchronous signal occurred and prevented completion of the call.
    Invalid argument.
    Input/output error; usually used for physical read or write errors.
    File is a directory; you cannot open a directory for writing, or create or remove hard links to it.
    Too many levels of symbolic links were encountered in looking up a file name.
    The current process has too many files open and can't open any more.
    Filename too long.
    There are too many distinct file openings in the entire system.
    The underlying file system of the specified file does not support memory mapping.
    No such file or directory.
    No memory available.
    No space left on device; write operation on a file failed because the disk is full.
    Function not implemented; this indicates that the system is missing some functionality.
    A file that isn't a directory was specified when a directory is required.
    No such device or address.
    Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
    Broken pipe; there is no process reading from the other end of a pipe.
    The directory containing the new link can't be modified because it's on a read-only file system.
    Text file busy.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the numeric value of this enum
    static FileError
    of(int value)
    Create a new FileError for the provided value
    static FileError
    of(MemorySegment address)
    Create a new FileError for the value in the provided memory address.
    static FileError
    Returns the enum constant of this class with the specified name.
    static FileError[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • EXIST

      public static final FileError EXIST
      Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
    • ISDIR

      public static final FileError ISDIR
      File is a directory; you cannot open a directory for writing, or create or remove hard links to it.
    • ACCES

      public static final FileError ACCES
      Permission denied; the file permissions do not allow the attempted operation.
    • NAMETOOLONG

      public static final FileError NAMETOOLONG
      Filename too long.
    • NOENT

      public static final FileError 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.
    • NOTDIR

      public static final FileError NOTDIR
      A file that isn't a directory was specified when a directory is required.
    • NXIO

      public static final FileError 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.
    • NODEV

      public static final FileError NODEV
      The underlying file system of the specified file does not support memory mapping.
    • ROFS

      public static final FileError ROFS
      The directory containing the new link can't be modified because it's on a read-only file system.
    • TXTBSY

      public static final FileError TXTBSY
      Text file busy.
    • FAULT

      public static final FileError FAULT
      You passed in a pointer to bad memory. (GLib won't reliably return this, don't pass in pointers to bad memory.)
    • LOOP

      public static final FileError LOOP
      Too many levels of symbolic links were encountered in looking up a file name. This often indicates a cycle of symbolic links.
    • NOSPC

      public static final FileError NOSPC
      No space left on device; write operation on a file failed because the disk is full.
    • NOMEM

      public static final FileError NOMEM
      No memory available. The system cannot allocate more virtual memory because its capacity is full.
    • MFILE

      public static final FileError MFILE
      The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit.
    • NFILE

      public static final FileError NFILE
      There are too many distinct file openings in the entire system.
    • BADF

      public static final FileError 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).
    • INVAL

      public static final FileError INVAL
      Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function.
    • PIPE

      public static final FileError 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'.
    • AGAIN

      public static final FileError AGAIN
      Resource temporarily unavailable; the call might work if you try again later.
    • INTR

      public static final FileError INTR
      Interrupted function call; an asynchronous signal occurred and prevented completion of the call. When this happens, you should try the call again.
    • IO

      public static final FileError IO
      Input/output error; usually used for physical read or write errors. i.e. the disk or other physical device hardware is returning errors.
    • PERM

      public static final FileError PERM
      Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
    • NOSYS

      public static final FileError NOSYS
      Function not implemented; this indicates that the system is missing some functionality.
    • FAILED

      public static final FileError 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.
  • Method Details

    • values

      public static FileError[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FileError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static FileError of(int value)
      Create a new FileError for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static FileError of(MemorySegment address)
      Create a new FileError for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address