Package org.gnome.glib
Enum Class FileSetContentsFlags
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<FileSetContentsFlags>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum FileSetContentsFlags
extends Enum<FileSetContentsFlags>
implements Enumeration
Flags to pass to g_file_set_contents_full() to affect its safety and
performance.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionGuarantee 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.Guarantee file durability: after a crash, the new version of the file will be available.No guarantees about file consistency or durability.Only apply consistency and durability guarantees if the file already exists. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic FileSetContentsFlags
of
(int value) Create a new FileSetContentsFlags for the provided valuestatic FileSetContentsFlags
Returns the enum constant of this class with the specified name.static FileSetContentsFlags[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No guarantees about file consistency or durability. The most dangerous setting, which is slightly faster than other settings. -
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 anfsync()
on the file and use of an atomicrename()
of the new version of the file over the old. -
DURABLE
Guarantee file durability: after a crash, the new version of the file will be available. On Unix systems this equates to anfsync()
on the file (ifCONSISTENT
is unset), or the effects ofCONSISTENT
plus anfsync()
on the directory containing the file after callingrename()
. -
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
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
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 nameNullPointerException
- if the argument is null
-
of
Create a new FileSetContentsFlags for the provided value- Parameters:
value
- the bitfield value- Returns:
- the bitfield for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-