Next: , Previous: , Up: posix fd   [Index]


4.13.3 Writing to file descriptors

Function: write fd buffer
Function: write fd buffer size

Interface to the C function write(), (libc)write. Write bytes to the file descriptor fd from buffer. If successful return a non–negative fixnum representing the number of written bytes, else raise an exception.

buffer and size must represent a generalised C string, (vicare-libs)Introduction to generalised C strings. When buffer is a Scheme string: it is converted to a bytevector with string->ascii.

Function: pwrite fd buffer size off

Interface to the C function pwrite(), (libc)pwrite. Like write, but start writing at offset off from the start of the file; off must be a non–negative exact integer.