Skip to content

SSH.SFTPDirectory.OpenFile

Andrew Lambert edited this page Apr 22, 2024 · 9 revisions

SSH.SFTPDirectory.OpenFile

Method Signatures

 Function OpenFile(Optional FileName As String, TruePath As Boolean = False) As SSH.SFTPStream
 Function OpenFile(Index As Integer) As SSH.SFTPStream

Parameters

OpenFile(String, Boolean)

Name Type Comment
FileName String Optional. The name of the file in the directory to be downloaded. If not specified then the CurrentName property is used.
TruePath Boolean Optional. If True and the FileName refers to a symlink, then target file is opened directly using its true path rather than the link's path.

OpenFile(Integer)

Name Type Comment
Index Integer The index, in the current directory, of the file to be downloaded.

Return value

An SFTPStream from which file data can be read, or Nil on error. Check SFTPDirectory.LastError if this method returns Nil.

Remarks

Open a file in the directory for download.

Clone this wiki locally