Skip to content

Scala web templates: xylo.io

Stefan Endrullis edited this page Jun 10, 2019 · 2 revisions

This file contains templates related to I/O operations (e.g. file system, streams).

Conversation templates applicable to Strings:

  • .toFile - convert file path (String) to File
  • .toURL - convert URL (String) to URL
  • .toURI - convert URI (String) to URI

Templates for different types of resources:

  • .lines - get lines (content) of File, Path, InputStream, or URL`
  • .content - get content (as String) of File, Path, InputStream, or URL
  • .inputStream - get InputStream of String, File, or URL
  • .outputStream - get OutputStream of File
  • .bufferedReader - get BufferedReader of File, InputStream, or URL
  • .bufferedWriter - get BufferedWriter of File or OutputStream
  • .printStream - get PrintStream of File or OutputStream

Debug templates:

  • .sout - print variable to System.out
  • .soutv - print variable to System.out