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


4.13.2 Reading from file descriptors

Function: read fd buffer
Function: read fd buffer size

Interface to the C function read(), (libc)read. Read bytes from the file descriptor fd and store them in buffer. If successful return a non–negative fixnum representing the number of bytes read, else raise an exception.

buffer and size must represent a generalised C buffer, (vicare-libs)Introduction to generalised C buffers.

Function: pread fd buffer size off

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