set-file-contents ( seq path encoding -- ) (original) (raw)

Vocabulary
io.files

Inputs

seq a sequence
path a pathname string
encoding an encoding descriptor

Outputs
None

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, change-file-lines, file-contents, change-file-contents

Definition

USING: io ;

IN: io.files

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