ftplib-3.1-1-linux

所属分类:Linux/Unix编程
开发工具:Unix_Linux
文件大小:100KB
下载次数:23
上传日期:2009-02-26 19:43:20
上 传 者zhangyw520
说明:  linux下r的FTP源码,已经测试通过!
(linux ftp)

文件列表:
ftplib-3.1-1-linux\ftplib-3.1-1\ftplib.lsm (569, 2003-11-07)
ftplib-3.1-1-linux\ftplib-3.1-1\ftptest.c (2206, 2009-02-26)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpAccess.html (1146, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpCDUp.html (471, 1998-06-21)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpChdir.html (604, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpClose.html (490, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpConnect.html (955, 1997-11-26)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpDelete.html (597, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpDir.html (858, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpGet.html (767, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpInit.html (331, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpLastResponse.html (812, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\ftplib.html (2598, 2001-01-02)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpLogin.html (636, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpMkdir.html (591, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpModDate.html (1006, 1998-06-21)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpNlst.html (747, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpOptions.html (2867, 1998-06-24)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpPut.html (780, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpPwd.html (700, 1998-06-21)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpQuit.html (495, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpRead.html (855, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpRename.html (668, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpRmdir.html (598, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpSite.html (584, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpSize.html (1023, 1998-06-24)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpSysType.html (745, 1998-06-21)
ftplib-3.1-1-linux\ftplib-3.1-1\html\FtpWrite.html (734, 1997-11-06)
ftplib-3.1-1-linux\ftplib-3.1-1\html\model.html (305, 1998-06-21)
ftplib-3.1-1-linux\ftplib-3.1-1\html\qftp.html (2902, 1997-11-26)
ftplib-3.1-1-linux\ftplib-3.1-1\NOTES (975, 1998-06-24)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpdir.c (4143, 1997-11-13)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpdir.mak (5345, 1997-09-26)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpget.c (3366, 1997-11-13)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpget.mak (4941, 1997-09-26)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpsend.c (3857, 1997-11-13)
ftplib-3.1-1-linux\ftplib-3.1-1\old\ftpsend.mak (4965, 1997-09-26)
ftplib-3.1-1-linux\ftplib-3.1-1\RFC959.txt (147316, 1997-09-26)
ftplib-3.1-1-linux\ftplib-3.1-1\src\ftplib.c (27660, 2003-11-07)
... ...

FTP Library Routines Release 3 Thomas Pfau (pfau@nbpfaus.net) December 2, 1997 This package implements a callable interface to FTP. The FTP protocol is specified in RFC 959. The library has been tested on linux, OpenVMS and Windows NT. It should also work without major modification on other POSIX systems. All programs using the library should include ftplib.h. The routines look at the global variable ftplib_debug to determine how much information they should display. Level 1 has been left for user programs. Level 2 displays all responses received from the server. Level 3 displays all commands sent to the server. Along with some bug fixes, version 3 also includes support for user access to data connections. FtpAccess() allows a user program to open a remote file or directory. FtpRead() and FtpWrite() can then be used to transfer data. These functions perform the necessary conversions for ascii mode transfers if necessary. FtpClose() is used to close this connection. --- The following routines are implemented: void FtpInit(void); This routine should be called prior to any other routines. On most operating systems, it is a no-op but some others don't implement TCP/IP as seamlessly as others (Windows NT). int FtpConnect(const char *host, netbuf **nControl); Establishes a connection to the named host. The host name should be specified as or : where is a host name or ip address and is a service name or port number. The handle for the control connection is returned to 'nControl'. This handle can then be passed to other routines to control the connection and exchange data. Returns success/fail. int FtpLogin(const char *user, const char *pass, netbuf *nControl); Logs in using the specified username and password. Returns success/fail. int FtpSite(const char *cmd, netbuf *nControl); Issues the specified SITE command. See RFC 959 for more information. int FtpMkdir(const char *path, netbuf *nControl); Sends a create directory request to the server using the specified path. Returns success/fail. int FtpChdir(const char *path, netbuf *nControl); Sends a change working directory request to the server using the specified path. Returns success/fail. int FtpRmdir(const char *path, netbuf *nControl); Sends a remove directory request to the server using the specified path. Returns success/fail. int FtpNlst(const char *outputfile, const char *path, netbuf *nControl); Sends an NLST command to the server with the specified path. The response to this is a list of file names which will be written to the file named in outputfile. If outputfile is specified as NULL, the list will be written to stdout. int FtpDir(const char *outputfile, const char *path, netbuf *nControl); Sends a LIST command to the server with the specified path. The response to this is usually a long format directory listing which will be written to the file named in outputfile. If outputfile is specified as NULL, the list will be written to stdout. int FtpGet(const char *outputfile, const char *path, char mode, netbuf *nControl); Retreives the file specified by path and writes it to the file specified in outputfile. Image or ASCII transfer mode can be specified by setting mode to FTPLIB_IMAGE or FTPLIB_ASCII, respectively. int FtpPut(const char *inputfile, const char *path, char mode, netbuf *nControl); Sends the file specified by inputfile to the server with the name specified in path. Image or ASCII transfer mode can be specified by setting mode to FTPLIB_IMAGE or FTPLIB_ASCII, respectively. int FtpRename(const char *src, const char *dst, netbuf *nControl); Renames the remote file specified by src to the name specified in dst. int FtpDelete(const char *fnm, netbuf *nControl); Removes the specified file from the server. void FtpQuit(void, netbuf *nControl); Disconnects from the remote server. char *FtpLastResponse(netbuf *nControl); Returns a pointer to the buffer containing the last response received from the server. Useful for displaying error messages. int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, netbuf **nHandle); Opens the file or directory specified by 'path' and returns a handle to 'nHandle'. This handle can then be passed to FtpRead() or FtpWrite() to exchange data. To list a directory, set 'typ' to FTPLIB_DIR or FTPLIB_DIR_VERBOSE and 'mode' to FTPLIB_ASCII. To transfer files, set 'mode' to FTPLIB_ASCII for text files or FTPLIB_IMAGE for binary files and set 'typ' to FTPLIB_FILE_READ to retreive a file or FTPLIB_FILE_WRITE to send a file. int FtpRead(void *buf, int max, netbuf *nData); Reads up to 'max' bytes of data from the data connection specified by 'nData' and stores it in 'buf'. If the connection was opened in ascii mode, one line of is returned with the terminating new-line character. Otherwise, FtpRead() attempts to fill the buffer. int FtpWrite(void *buf, int len, netbuf *nData); Writes 'len' bytes of data from 'buf' to the data connection specified by 'nData'. If the connection was opened in ascii mode, FtpWrite() performs the necessary conversions. Otherwise, FtpWrite() passes the data verbatim. int FtpClose(netbuf *nData); Closes the data connection specified by 'nData' and frees associated resources.

近期下载者

相关文件


收藏者