Formatted File

public abstract class FormattedFile

Formatted representation of a File that provides easier access to the files content. A formatted file may be read only and won't change the underlying data when an attempt to save the file is made.

Constructors

Link copied to clipboard

Functions

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 abstract 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 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

Inheritors

Link copied to clipboard