Back to product page

RemoteOpen method


Opens remote file for raw access.

Type

None

Syntax

  • Basic
object.RemoteOpen RemoteFile, Permissions
The RemoteOpen(object,RemoteFile,Permissions) syntax has these parts:
objectAn expression evaluating to an object of type wodSFTP.
RemoteFileString value. Specifies full path to the file on remote server.
PermissionsRemotePermissions . Defines combination of flags to open remote file.

Remarks

The settings for Permissions are:

Constant Value Description
PermRead 1 Opens remote file with read permissions.
PermWrite 2 Opens remote file with write permissions.
PermCreate 4 Creates remote file.
PermTruncate 8 Truncates remote file.


The RemoteOpen method will open remote file so you can access it as raw data - to manually read or write to parts of that file. You will use RemoteRead and RemoteWrite for accessing the file.

When opening file, you should specify Permissions for opening the file, as specifies in Settings section.

While remote file is opened, you should not call other methods than RemoteRead, RemoteWrite, RemoteClose since they may interfere with raw data access. Only one file can be opened at a time using RemoteOpen method.

Platforms

Windows