Vocabularyio.
filesInputspath | a pathname string |
encoding | an encoding descriptor |
OutputsWord descriptionOpens the file at the given path using the given encoding, and returns a list of the lines in that file.
ExamplesUSING: io.files io.encodings.utf8 prettyprint sequences ;
"resource:core/kernel/kernel.factor" utf8 file-lines first .
"! Copyright (C) 2004, 2009 Slava Pestov."
ErrorsThrows an error if the file cannot be opened for reading.
See alsoset-file-lines,
change-file-lines,
set-file-contents,
file-contents,
change-file-contentsDefinition