Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

FileTransferClient.GetFileAsync Method

Namespace: Rebex.Net
Assembly: Rebex.FileTransfer.dll (version 7.0.9147)

GetFileAsync(String, Stream, Object)

Downloads the specified emote file to the data stream.

Declaration
public Task<long> GetFileAsync(string remotePath, Stream outputStream, object state = null)
Parameters
Type Name Description
String remotePath

The path of the remote file.

Stream outputStream

The output stream.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<Int64>

Number of bytes transferred.

Implements
IFtp.GetFileAsync(String, Stream, Object)
Remarks

If the local file does not exist, it is created.

GetFileAsync(String, Stream, Int64, Object)

Downloads the specified part of the remote file to the data stream.

Declaration
public Task<long> GetFileAsync(string remotePath, Stream outputStream, long remoteOffset, object state = null)
Parameters
Type Name Description
String remotePath

The path of the remote file.

Stream outputStream

The output stream.

Int64 remoteOffset

The starting offset of the remote file.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<Int64>

Number of bytes transferred.

Implements
IFtp.GetFileAsync(String, Stream, Int64, Object)
Remarks

If the local file does not exist, it is created.

GetFileAsync(String, String, Object)

Downloads the remote file to the specified local file.

Declaration
public Task<long> GetFileAsync(string remotePath, string localPath, object state = null)
Parameters
Type Name Description
String remotePath

The path of the remote file.

String localPath

The path of the local file. This cannot be a directory.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<Int64>

Number of bytes transferred.

Implements
IFtp.GetFileAsync(String, String, Object)
Remarks

If the local file does not exist, it is created.

GetFileAsync(String, String, Int64, Int64, Object)

Downloads the specified part of the remote file to the specified offset of the local file.

Declaration
public Task<long> GetFileAsync(string remotePath, string localPath, long remoteOffset, long localOffset, object state = null)
Parameters
Type Name Description
String remotePath

The path of the remote file.

String localPath

The path of the local file. This cannot be a directory.

Int64 remoteOffset

The starting offset of the remote file.

Int64 localOffset

The starting offset in the local file.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<Int64>

Number of bytes transferred.

Implements
IFtp.GetFileAsync(String, String, Int64, Int64, Object)
Remarks

If the local file does not exist, it is created.

In This Article
  • GetFileAsync(String, Stream, Object)
  • GetFileAsync(String, Stream, Int64, Object)
  • GetFileAsync(String, String, Object)
  • GetFileAsync(String, String, Int64, Int64, Object)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies