writeBytes Method

Top  Previous  Next

Writes data bytes to a file.

Syntax

file.writeBytes(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

If value is undefined or null, it is skipped. If value is a string, the string is written to the file. Otherwise, value is converted to an integer and truncated to 8 bits, and one byte is written to the file. Array elements are written to the file individually following these rules, with no separator between elements.

Examples

 

See Also