Skip to content

SSH.SFTPSession.CreateStream

Andrew Lambert edited this page Nov 26, 2022 · 11 revisions

SSH.SFTPSession.CreateStream

Method Signature

 Function CreateStream(FileName As String, Flags As Integer, Mode As Integer, Directory As Boolean) As SSH.SFTPStream

Parameters

Name Type Comment
FileName String The name of the file or directory on the server.
Flags Integer A bitmask of any reasonable combination of the LIBSSH2_FXF_* constants.
Mode Integer The Unix-style permissions to apply to the file or directory, if applicable given the operation(s) specified in the Flags.
Directory Boolean If True then the operation is expecting FileName to refer to a directory.

Return value

Returns an instance of SFTPStream, or Nil on error. Check SFTPSession.LastError for error details.

Remarks

This method opens a SFTPStream according to the parameters. It is a more generic version of the Append, Get, Put, and ListDirectory methods, allowing custom functionality.

See also

Clone this wiki locally