# file.writeLines

Writes an array of lines to a file

Usage

    file.writeLines [-l] [-a] [-c] <filename> <lines>

Description
Writes the array of <lines> to the specified file. The lines are separated by a single linefeed character (see also $lf) unless the -c or -n switches are used. If the file already exists then it is overwritten with the new data unless the -a switch is used. The lines array is encoded in the ut8 character set unless the -l switch is used.
Switches

-l | --local-8-bit
Causes the lines to be saved in local 8 bit character set instead of the default unicode encoding.
-a | --append
If the file already exists, then the lines are appended to the end instead of overwriting the file.
-c | --crlf
The lines are separated by a carriage-return+line-feed character combination, compatible with windows text mode files. This is the only way to make the file readable in windows notepad, for example. Please note that this is broken design: do NOT use it :)
-n | --no-separator
Do not separate the lines at all (either the separators are already inside the lines array or no line separation is desired at all). -n takes precedence over -c.
-q | --quiet
Don't complain if the file can't be opened: just fail silently

Syntax Specification

    file.writeLines [-l] [-a] [-c] <filename:string> <lines:array>

See also
$file.readlines

Index, Commands

KVIrc 4.0.2.4740 Documentation
Generated by root at Tue Feb 1 06:16:04 2011