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

Sftp.GetFile Method

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

GetFile(String, Stream)

Downloads the remote file to the data stream.

Declaration
public long GetFile(string remotePath, Stream outputStream)
Parameters
Type Name Description
String remotePath

The path of the remote file.

Stream outputStream

The output stream.

Returns
Type Description
Int64

Number of bytes transferred.

Implements
IFtp.GetFile(String, Stream)

GetFile(String, String)

Downloads the remote file to the local file, overriding it if it already exists.

Declaration
public long GetFile(string remotePath, string localPath)
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.

Returns
Type Description
Int64

Number of bytes transferred.

Implements
IFtp.GetFile(String, String)

GetFile(String, Stream, Int64, Int64)

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

Declaration
public long GetFile(string remotePath, Stream outputStream, long remoteOffset, long length)
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.

Int64 length

Number of bytes to transfer or -1 to transfer all data until an end is reached.

Returns
Type Description
Int64

Number of bytes transferred.

Remarks

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

GetFile(String, String, Int64, Int64, Int64)

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

Declaration
public long GetFile(string remotePath, string localPath, long remoteOffset, long localOffset, long length)
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.

Int64 length

Number of bytes to transfer or -1 to transfer until the end is reached.

Returns
Type Description
Int64

Number of bytes transferred.

Remarks

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

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