Downloads remote file from FTP server. If local_file exists, the
download will be aborted unless replace is passed and .true..
The function returns the following error codes:
E_COMPILER if C pointers could not be nullified (compiler bug).E_EXIST if local file exists.E_FTP if initialisation or connection failed.E_FTP_AUTH if FTP authentication failed.E_FTP_CONNECT if connection to server could not be established.E_FTP_SSL if SSL/TLS error occured.E_INVALID if arguments or FTP server type attributes are invalid.E_IO if local file could not be opened for writing.| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ftp_server_type), | intent(inout) | :: | server |
FTP server type. |
||
| character(len=*), | intent(in) | :: | remote_file |
Path of remote file to download. |
||
| character(len=*), | intent(in) | :: | local_file |
Path of local file. |
||
| logical, | intent(in), | optional | :: | replace |
Replace existing file. |
|
| logical, | intent(in), | optional | :: | debug |
Output debug messages. |
|
| character(len=:), | intent(out), | optional, | allocatable | :: | error_message |
Error message. |
| integer, | intent(out), | optional | :: | error_curl |
cURL error code. |