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


Vocabulary
io.files

Inputs and outputs
seqa sequence
patha pathname string
encodingan encoding descriptor


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

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

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

Definition
USING: io ;

IN: io.files

: set-file-contents ( seq path encoding -- )
[ write ] with-file-writer ;