Description
-
Opens remote file for raw access.
Return type
- A Long value. If successful, 0 is returned, otherwise
error as specified here.
Syntax
-
long Sftp_RemoteOpen(void *Sftp, char *RemoteFile, RemotePermissions
Permission);
The RemoteOpen function syntax
has these parts:
- Settings
-
The settings for Permission are:
 |
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. |
Remarks
-
The RemoteOpen function 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 functions
than RemoteRead, RemoteWrite,
RemoteClose since
they may interfere with raw data access. Only one file can be opened
at a time using RemoteOpen function.
|