Back to FabImage Library website

You are here: Start » Function Reference » System » FTP » Ftp_ReceiveFile

Ftp_ReceiveFile


Header: FIL.h
Namespace: fil
Module: FoundationBasic

Downloads a file from a remote server using FTP (File Transfer Protocol).

Syntax

C++
C#
 
void fil::Ftp_ReceiveFile
(
	const ftl::File& inFilePath,
	const ftl::String& inHostName,
	const ftl::String& inFtpFilePath,
	ftl::Optional<const ftl::String&> inUsername,
	ftl::Optional<const ftl::String&> inPassword,
	bool inUsePassiveMode
)

Parameters

Name Type Default Description
Input value
inFilePath const File& Location of the file on a remote server
Input value
inHostName const String& \"ftp://\" URL address of the remote server.
Input value
inFtpFilePath const String& Location of the file on a remote server.
Input value
inUsername Optional<const String&> NIL User name needed to log in.
Input value
inPassword Optional<const String&> NIL Password associated with a user name.
Input value
inUsePassiveMode bool Protocol communication mode. May be necessary when using a firewall.

Errors

List of possible exceptions:

Error type Description
DomainError Empty ftp file path on input in Ftp_ReceiveFile
DomainError Empty host name on input in Ftp_ReceiveFile
DomainError Empty path on input in Ftp_ReceiveFile