fileReadAsString

Gets the entire file contents as a string.

Given the following contents of simple_cards.txt (a 2-line file)...

front 1|back 1
front 2|back 2

Example (REPL) usage (compare with fileReadAsList):

>>> fileReadAsString("simple_cards.txt")
res1: kotlin.String = front 1|back 1
front 2|back 2

Return

the contents of the file as a string, or "" if it does not exist

Parameters

path

relative or absolute path to a file