KSnip / com.github.nwillc.ksnip.controller / SnippetController

SnippetController

class SnippetController : Controller

Application controller for operations regarding Snippets.

Constructors

<init>

SnippetController()

Application controller for operations regarding Snippets.

Properties

snippets

var snippets: ArrayList<Snippet>

the working list of snippets.

Functions

addSnippet

fun addSnippet(category: String, title: String, body: String): Unit

Add a new Snippet to the snippets.

import

fun import(file: File): Unit

Import a JSON file containing an array of snippets.

importLagacy

fun importLagacy(file: File): Unit

Import a LegacyFile of snippets.

saveAs

fun saveAs(file: File): Unit

Save an array of Snippets to a file.