Properties File

public final class PropertiesFile extends FormattedFile

Constructors

Link copied to clipboard
public PropertiesFile PropertiesFile(File file, Boolean loadOnInit)
Link copied to clipboard

Functions

Link copied to clipboard
public final Boolean exists(String key)
Link copied to clipboard
public final String get(String key)
public final String get(String key, String default)
Link copied to clipboard

Returns whether the file was changed or not. What defines a change is an implementation detaill. If a file was saved successfully, this method must return false. Defaults to: false

Link copied to clipboard

Returns whether the file is editable or not. Defaults to: false

Link copied to clipboard
public Unit load()

Loads the content of the file to work with it. Implementations may load the content implicit when accessing the file.

Link copied to clipboard
public final Object remove(String key)
Link copied to clipboard
public final String set(String key, String value)
Link copied to clipboard
public Unit store()

Saves the current state of the file to the filesystem. Only files that are editable need to implement this method. Defaults to: noop