Versions Compared

Key

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

...

Anchor10441191044119 FTPc_RecvFile() Anchor10446131044613Receives a file into the file system.anchor10446141044614

Files

...

ftp-c.h/ftp-c.c

...

...

Prototype

...

CPU_CHAR *

                                      CPU_CHAR   *p_local_file_name,
NET_ERR *perr_net);
HTML Table
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan5
Anchor
10491751049175
Code Block
          CPU_BOOLEAN  FTPc_RecvFile (FTPc_CONN  *p_conn,
                                      CPU_CHAR   *p_remote_file_name,
Anchor
10491761049176
Anchor
10491771049177
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)

...


                                      FTPc_ERR   *p_err);


Arguments

p_conn

Pointer to FTPc Connection object.

p_remote_file_name 

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

...

local_file_

...

name 

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

...

...

p_err

...

 

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.

...

Required Configuration

...

  • This function can only be used when FTPc_CFG_USE_FS is set tot DEF_ENABLED.

Notes / Warnings

...

10487881048788None. Anchor10488251048825

Example Usage

CPU_BOOLEAN result; NET_ERR err;   result = FTPc_RecvFile((CPU_CHAR *) "file_remote", (CPU_CHAR *) (NET_ERR *)

                       &err);
if

if (result != DEF_OK)
{
 {
	printf("FTPc_RecvBuf() failed.\n\r");
}tr

}
HTML Table
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan8
Anchor
10492191049219
Anchor
10487971048797
Anchor
10488021048802
Anchor
10492281049228
Anchor
10488031048803
Code Block

FTPc_CONN    conn;
CPU_BOOLEAN  result;
FTPc_ERR     err;
           
result = FTPc_RecvFile(&conn,
                       "file_remote",
                       "\\file_local",
Anchor
10488041048804
Anchor
10488051048805
Anchor
10488061048806
Anchor
10488101048810
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)