Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Files

ftp-c.h/ftp-c.c

Prototype

Code Block
          CPU_BOOLEAN  FTPc_RecvFile (FTPc_CONN  *p_conn,
                                      CPU_CHAR   *p_remote_file_name,
                                      CPU_CHAR   *p_local_file_name,
                                      FTPc_ERR   *p_err);


Arguments

p_conn

Pointer to FTPc Connection object.

p_remote_file_name 

File Pointer to name of the file on the remote FTP server.

local_file_name 

File on Pointer to  name of the file in the local file system..

p_err_net 

Pointer to variable that will receive the return error code from this function.:

FTPc_ERR_NONE
FTPc_ERR_TX_CMD
FTPc_ERR_RX_CMD_RESP_FAIL
FTPc_ERR_FILE_NOT_FOUND
FTPc_ERR_FAULT
FTPc_ERR_FILE_OPEN_FAIL 

Returned Values

DEF_OK,     File successfully received;
DEF_FAIL, otherwise.

...

Notes / Warnings

None.

Example Usage

Code Block

FTPc_CONN    conn;
CPU_BOOLEAN  result;
FTPc_ERR     err;
           
result = FTPc_RecvFile(&conn,
                       "file_remote",
                       "\\file_local",
                       &err);
if (result != DEF_OK) {
	printf("FTPc_RecvBuf() failed.\n\r");
}