Exemple #1
0
/*
 * FtpPut - issue a PUT command and send data from input
 *
 * return 1 if successful, 0 otherwise
 */
GLOBALDEF int FtpPut(const char *inputfile, const char *path, char mode,
		netbuf *nControl)
{
	return FtpXfer(inputfile, path, nControl, FTPLIB_FILE_WRITE, mode);
}
Exemple #2
0
/*
 * FtpDir - issue a LIST command and write response to output
 *
 * return 1 if successful, 0 otherwise
 */
GLOBALDEF int FtpDir(const char *outputfile, const char *path, netbuf *nControl)
{
	return FtpXfer(outputfile, path, nControl, FTPLIB_DIR_VERBOSE, FTPLIB_ASCII);
}
Exemple #3
0
/*
 * FtpGet - issue a GET command and write received data to output
 *
 * return 1 if successful, 0 otherwise
 */
GLOBALDEF int FtpGet(const char *outputfile, const char *path,
		char mode, netbuf *nControl)
{
	return FtpXfer(outputfile, path, nControl, FTPLIB_FILE_READ, mode);
}
/*
 * FtpNlst - issue an NLST command and write response to output
 *
 * return 1 if successful, 0 otherwise
 */
int FtpNlst(const char *outputfile, const char *path,
            netbuf *nControl) {
    return FtpXfer(outputfile, path, nControl, FTPLIB_DIR, FTPLIB_ASCII);
}