Extracted from Pike v7.3 release 14 at 2002-02-15.
pike.roxen.com
[Top]
Stdio
Stdio.Fd

Method Stdio.Fd()->write()


Method write

int Stdio.Fd()->write(string data)
int Stdio.Fd()->write(string format, mixed ... extras)
int Stdio.Fd()->write(array(string) data)
int Stdio.Fd()->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, efun::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

Stdio.Fd.read, Stdio.Fd.write_oob