Syntax
int FTP_Command(
unsigned char command,
char *param1,
char *param2
);
Parameters
- command
- [in] Specify a command to send to the FTP server.
- param1
- [in] Specify param1 of the command.
- param2
- [in] Specify param2 of the command.
command | param1 | param2 | Description |
---|---|---|---|
FTP_CMD_USERNAME | Username | NULL | Send the username. |
FTP_CMD_PASSWORD | Password | NULL | Send the password |
FTP_CMD_CHPATH | Path. | NULL | Set current working directory. |
FTP_CMD_TYPESET | Data type ("A":ASCII, "I":Binary) | NULL | Set the data type. |
FTP_CMD_PUT | File name on the terminal. | File name on the FTP server. | Upload a file to the FTP server. |
FTP_CMD_RENAME | File name before renaming. | File name after renaming. | Rename a file on the FTP server. |
FTP_CMD_GET | File name on the terminal. | File name on the FTP server. | Download a file from the FTP server. |
FTP_CMD_DEL | File name on the FTP server. | NULL | Delete a file on the FTP server. |
FTP_CMD_QUIT | NULL | NULL | Log out of the FTP server. |
Return value
Returns M2M_SUCCESS if the function succeeds, otherwise it returns any other value.Remarks
To connect to the FTP server, call the FTP_Connect function.Be sure to call the FTP_Finish function after using the FTP client.
Requirements
Header file:
lib.hLibrary file:
FTP.h
libFTP.a
libSTARTUPOPH5000.a
Last updated: 2021/06/03