Enum Class FileSetContentsFlags

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

@Generated("org.javagi.JavaGI") public enum FileSetContentsFlags extends Enum<FileSetContentsFlags> implements Enumeration
Flags to pass to g_file_set_contents_full() to affect its safety and performance.
Since:
2.66
  • Enum Constant Details

    • NONE

      public static final FileSetContentsFlags NONE
      No guarantees about file consistency or durability. The most dangerous setting, which is slightly faster than other settings.
    • CONSISTENT

      public static final FileSetContentsFlags CONSISTENT
      Guarantee file consistency: after a crash, either the old version of the file or the new version of the file will be available, but not a mixture. On Unix systems this equates to an fsync() on the file and use of an atomic rename() of the new version of the file over the old.
    • DURABLE

      public static final FileSetContentsFlags DURABLE
      Guarantee file durability: after a crash, the new version of the file will be available. On Unix systems this equates to an fsync() on the file (if CONSISTENT is unset), or the effects of CONSISTENT plus an fsync() on the directory containing the file after calling rename().
    • ONLY_EXISTING

      public static final FileSetContentsFlags ONLY_EXISTING
      Only apply consistency and durability guarantees if the file already exists. This may speed up file operations if the file doesn’t currently exist, but may result in a corrupted version of the new file if the system crashes while writing it.
  • Method Details

    • values

      public static FileSetContentsFlags[] 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 FileSetContentsFlags 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
    • getValue

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

      public static Set<FileSetContentsFlags> of(int flags)
      Create a new EnumSet<FileSetContentsFlags> for the provided bitfield
      Parameters:
      flags - the FileSetContentsFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<FileSetContentsFlags> of(MemorySegment address)
      Create a new EnumSet<FileSetContentsFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address