FtpSize

Determine size of remote file.

SYNOPSIS

#include <ftplib.h>
int FtpSize(char *path, unsigned int *size, char mode, netbuf *nControl);

PARAMETERS

path
Name of a file on the remote server.
size
A pointer to an unsigned integer where the size will be returned.
mode
Specifies the transfer mode as FTPLIB_ASCII or FTPLIB_IMAGE.
nControl
A handle returned by FtpConnect().

DESCRIPTION

FtpSize() attempts to determine the size of a remote file.

RETURN VALUE

If a good response is received and the size is successfully parsed out of the result, 1 is returned. Otherwise, 0 is returned.

Some servers may not support the SIZE command. If this request fails, the size may be available in the response to a RETR (FtpOpen() with typ=FTPLIB_FILE_READ).