@param accesstype Is one of O_RDONLY, O_WRONLY or O_RDWR which request
opening the file read-only,write-only or read/write.
Acesss may also be bitwise-or'd with one or more of
the following:
O_CREAT - If the file does not exist it will be
created.
O_EXCL - When used with O_CREAT, if the file already
exists it is an error and the open will fail.
O_TRUNC - If the file already exists it will be
truncated.
@param mode Mode specifies the permissions to use if a new file is
created. It is modified by the process's umask in
the usual way: The permissions of the created file are
(mode & ~umask)
@return A sftp file handle, NULL on error with ssh and sftp
error set.
@brief Open a file on the server.
@param session The sftp session handle.
@param file The file to be opened.
@param accesstype Is one of O_RDONLY, O_WRONLY or O_RDWR which request opening the file read-only,write-only or read/write. Acesss may also be bitwise-or'd with one or more of the following: O_CREAT - If the file does not exist it will be created. O_EXCL - When used with O_CREAT, if the file already exists it is an error and the open will fail. O_TRUNC - If the file already exists it will be truncated.
@param mode Mode specifies the permissions to use if a new file is created. It is modified by the process's umask in the usual way: The permissions of the created file are (mode & ~umask)
@return A sftp file handle, NULL on error with ssh and sftp error set.
@see sftp_get_error()