set-file-lines ( seq path encoding -- )
Factor documentation > Factor handbook > Input and output > Reading and writing files
Prev:file-lines ( path encoding -- seq )
Next:with-file-reader ( path encoding quot -- )


Vocabulary
io.files

Inputs and outputs
seqan array of strings
patha pathname string
encodingan encoding descriptor


Word description
Sets the contents of a file to the strings with the given encoding.

Errors
Throws an error if the file cannot be opened for writing.

See also
file-lines, set-file-contents, file-contents

Definition
USING: io sequences ;

IN: io.files

: set-file-lines ( seq path encoding -- )
[ [ print ] each ] with-file-writer ;