Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ft_open - Open session

&pagelevel(3)&pagelevel

You can use ft_open() to open a session. You can only transfer files asynchronously (function ft_transfer()) and manage asynchronous file transfer requests (functions ft_reqlist(), ft_reqstat(), ft_cancel() and ft_reqterm()) within a session.
ft_open() returns a session number which uniquely identifies the session. This session number must be specified for function calls issued in the same session.
You can open several session simultaneously in one program, provided that different working directories are assigned.

Syntax

#include <ftapi.h>
void *ft_open(const char *workdir,          /* input */
                struct ft_err *errorinfo,
                void *options);              /* input */

Parameter

workdir

Name of the working directory assigned to the session.
Files containing management information are stored in this directory.
Please note that the password used to call the program interface must have authorization to store files in this directory.

errorinfo

Area in which detailed information is stored if an error is encountered (see section “ft_err” (Error handling)).
The specification of this parameter is optional. If you do not require any more precise error information then you can specify the value NULL for errorinfo.

options

The specification of the options parameter is optional. If the value NULL is specified then message activity at the program interface is compatible with that of the program interface of openFT < V10.
Alternatively, it is possible to specify the ft_options structure (see section “ft_options” (Version of the program interface)) to activate the openFT message number scheme as of openFT V10 and the extensions to the function.

Return value

n

Session ID (n != 0).
This value must be specified for function calls issued in the same session.

NULL

Error. The error type is stored in errorinfo.