ftplib_read

Read data from a remote file or directory.

SYNOPSIS

#include <ftplib.h>
int ftplib_read(void *buf, int max, netbuf *rnbp);

PARAMETERS

buf
Specifies the address of a buffer where received data will be written.
max
Specifies the size of the user's buffer.
rnbp
A handle returned by ftplib_access().

DESCRIPTION

ftplib_read() copies up to max bytes of data from the specified data connection and returns it to the user's buffer. If the data connection was opened in ASCII mode, no more than one line of data will be returned.

RETURN VALUE

Returns the number of bytes written to the user's buffer or -1 on error or end of file.

$Id: ftplib_read.html,v 1.1 2002/12/02 03:12:52 te Exp $