SSH.SFTPSession.CreateStream - charonn0/RB-libssh2 GitHub Wiki
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
- libssh2_sftp_open_ex in the libssh2 documentation for a description of the possible
Flags,