 | FTPDownloadFileStream Method |
Download a file via FTP as stream
Namespace: ProFTPNetLibraryAssembly: ClientFTPNetLibrary (in ClientFTPNetLibrary.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static MemoryStream DownloadFileStream(
Uri sourceFile,
string username,
string password,
string proxyAddress,
bool passive,
int port,
bool keepAlive
)
Public Shared Function DownloadFileStream (
sourceFile As Uri,
username As String,
password As String,
proxyAddress As String,
passive As Boolean,
port As Integer,
keepAlive As Boolean
) As MemoryStream
Parameters
- sourceFile
- Type: SystemUri
Uri of the file to download (es: "ftp://www.domain.com/downloadme.txt") - username
- Type: SystemString
FTP access username - password
- Type: SystemString
FTP access password - proxyAddress
- Type: SystemString
FTP proxy (string.empty if unknown or not used) - passive
- Type: SystemBoolean
FTP passive mode enabling (false if unknown or not used) - port
- Type: SystemInt32
FTP access port (usually 21) - keepAlive
- Type: SystemBoolean
Define if you need to keep alive the connection after the process (usually false)
Return Value
Type:
MemoryStreamMemoryStream object of the file; null otherwise
See Also