write Method

Top  Previous  Next

Writes data to a file.

Syntax

file.write(value [, value [, ...]])

Arguments

valueThe data to write to the file.

Return Value

Zero if successful; a negative number representing an error code if failure.

Remarks

The arguments are converted to strings before writing them to the file, except for undefined and null, which are ignored. Arrays elements are converted to string and written to the file with no separator between elements.

Examples

 

See Also