FileDocument
class in package klyn.gui.terminal

    public class FileDocument extends Object:

Object
└ FileDocument

Editable text document backed by an optional file path.

Fields

Modifier and Type | Member | Description
--- | --- | ---
public | path `path as String = ""` | Absolute or relative file path.
public | text `text as String = ""` | Full text content.
public | title `title as String = "Editor"` | Title displayed in UI tabs.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | extension `extension as String:` | Returns the file extension in lower case, without the dot.

Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | FileDocument `FileDocument(path as String = ""):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | load `load() as Void:` | Loads the file content into the document when the path exists.
public | save `save() as Void:` | Persists the document content to disk.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml