Reference · Object · library.rs

Library Object

Workflows and history, saved as one JSON file in folder.

class Library {
    static func open(folder: String) -> Library
    func reload()
    func workflows() -> [Workflow]
    func workflow(id: String) -> Workflow?
    func mayAddWorkflow(isPro: Bool) -> Bool
    func saveWorkflow(w: Workflow)
    func deleteWorkflow(id: String)
    func history() -> [HistoryEntry]
    func record(e: HistoryEntry)
    func removeEntry(id: String)
    func clearHistory()
}

Methods

open Constructor

No description yet.

static func open(folder: String) -> Library

Parameters

NameTypeSwift / C#
folderStringfolder

Returns

Library

Errors

Does not throw.

reload

Reads the file again: another process (the app's share extension) may have written to it. A file that does not read completely changes nothing.

func reload()

Parameters

None.

Returns

Nothing.

Errors

Does not throw.

workflows

No description yet.

func workflows() -> [Workflow]

Parameters

None.

Returns

Vec<Workflow>

Errors

Does not throw.

workflow

No description yet.

func workflow(id: String) -> Workflow?

Parameters

NameTypeSwift / C#
idStringid

Returns

Option<Workflow>

Errors

Does not throw.

may_add_workflow

A new workflow may be made (the first is free).

func mayAddWorkflow(isPro: Bool) -> Bool

Parameters

NameTypeSwift / C#
is_proboolisPro

Returns

bool

Errors

Does not throw.

save_workflow

No description yet.

func saveWorkflow(w: Workflow)

Parameters

NameTypeSwift / C#
wWorkfloww

Returns

Nothing.

Errors

Does not throw.

delete_workflow

No description yet.

func deleteWorkflow(id: String)

Parameters

NameTypeSwift / C#
idStringid

Returns

Nothing.

Errors

Does not throw.

history

No description yet.

func history() -> [HistoryEntry]

Parameters

None.

Returns

Vec<HistoryEntry>

Errors

Does not throw.

record

No description yet.

func record(e: HistoryEntry)

Parameters

NameTypeSwift / C#
eHistoryEntrye

Returns

Nothing.

Errors

Does not throw.

remove_entry

No description yet.

func removeEntry(id: String)

Parameters

NameTypeSwift / C#
idStringid

Returns

Nothing.

Errors

Does not throw.

clear_history

No description yet.

func clearHistory()

Parameters

None.

Returns

Nothing.

Errors

Does not throw.

Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.