Class: FileStorage

core.FileStorage

Class representing a storage for persisted properties, such as user preferences.

The properties are persisted in a file on a file system, and their values must be JSON-serializable.

Example

FileStorage {
    filesystem: LocalFS { }
    path: "/path/to/the/storage/file"

    property foo: "bar"
    property anotherProperty: 42
}

new core.FileStorage ()

Properties:
Name Type Description
filesystem core.Filesystem

(default: null) The filesystem to use.

path string

(default: "") The path of the storage file.

ready bool

[read-only] true when the storage is loaded and ready.

Extends