Server's files read/write procedures

This library contains special functions for remote files reading and writing, without precopying them to local files. The functions, which are described below, do it. After the data channel to a remote file is created, it becomes possible to read and write characters using standard Input/Output functions, or using special functions FtpRead/FtpWrite, which reorganize stream for standard text file, under condition that the ASCII mode is set. 7


FtpData(FTP *, char *command, char *param, char *mode)

Makes data transfer channel, with presending command composed from command and param. The mode must be ``r'' or ``w''


FtpOpenRead(FTP *,char *filename)

Opens file named filename for reading on server


FtpOpenWrite(FTP *,char *filename)

Creats and opens file named filename for writing on server


FtpOpenAppend(FTP *,char *filename)

Creats and opens file named filename for appending on server


FtpOpenDir(FTP *, char *files)

Creats channel for directory list reading, described by argument files.


int FtpRead(FTP *)

Reads character from data stream. If ASCII mode is set8 converts new line markers. When the end of file is detected or channel is broken, returns EOF


FtpGetString(FTP *, char *str)

Reads one string from data stream using FtpRead


FtpWrite(FTP *, char c)

Writes single character to stream, if ASCII mode is set converts new line markers. When channel is broken, returns EOF


FtpClose(FTP *)

Closes opened channel to server