Downloads the remote file to the local file.

Namespace:  Rebex.Net
Assembly:  Rebex.Ftp (in Rebex.Ftp.dll)

Syntax

Visual Basic
Public Function GetFile ( _
	remotePath As String, _
	localPath As String _
) As Long
C#
public long GetFile(
	string remotePath,
	string localPath
)

Parameters

remotePath
Type: System..::..String
The path of the remote file.
localPath
Type: System..::..String
The path of the local file. This cannot be a directory.

Return Value

Number of bytes transferred.

Implements

IFtp..::..GetFile(String, String)

Remarks

The path parameter can specify either relative or absolute path. Relative path is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory()()()().

If the specified file does not exist, it is created; if it does exist, it is truncated and overwritten.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also