Extracted from Pike v7.4 release 341 at 2005-11-30.
pike.ida.liu.se
[Top]
predef::
Stdio
Stdio.File

Method Stdio.File()->write()


Method write

int write(string data)
int write(string format, mixed ... extras)
int write(array(string) data)
int write(array(string) format, mixed ... extras)

Description

Write data to a file or a stream.

Writes data and returns the number of bytes that were actually written.

If more than one argument is given, sprintf() will be used to format them.

If data is an array, it will be concatenated, and then written.

0 is returned in nonblocking mode if it was not possible to write anything without blocking.

-1 is returned if something went wrong and no bytes were written.

Note

Writing of wide strings is not supported.

See also

read() , write_oob()