fileReadAsList

Gets the entire file contents as a list of strings (one per line).

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 fileReadAsString):

>>> fileReadAsList("simple_cards.txt")
res1: kotlin.collections.List<kotlin.String> = [front 1|back 1, front 2|back 2]

Return

the contents of the file as a list of strings, or empty if it does not exist

Parameters

path

relative or absolute path to a file