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_delete - Delete file or directory in the remote system

You can use ft_delete() to delete a file or a directory in the remote system. File directories that are to be deleted must be empty.
In order to delete a file, the filetype parameter in the par structure must contain the value FT_FILE.
To delete a directory, the filetype parameter in the par structure must contain the value FT_DIRECTORY.
File names and directory names must not exceed the length specified in the maxrfnsize field of the ft_prop structure (see section "ft_properties - Determine properties of the program interface").

Syntax

#include <ftapi.h>
int ft_delete(const struct ft_admission *admis,  /* input */
                const struct ft_delpar *par,       /* input */
                struct ft_err *errorinfo,
                void *options);                   /* input */

Parameter

admis

Transfer admission for the remote system (see section "ft_admission" (Specifications concerning the remote system)).

par

Entries for delete request which you specify with the structure ft_delpar:

struct ft_delpar
{
   int   delparvers;             /* input */
   char  *fn;                    /* input */
   char  *mgmtpasswd;            /* input */
   enum  ft_filedir filetype;    /* input */
   char  *fud;                   /* input */
   int   fudlen;                 /* input */
};


The fields of the structure ft_delpar have the following meanings:

delparvers

Version of the data structure.
delparvers must be supplied the value FT_DPARV1 or FT_DPARV2.

fn

Name of the file or directory to be deleted in the remote system.
Absolute and relative path names are permissible. Relative path names
refer to the login name specified in the admission profile, when the FTAC
function is used, otherwise to the HOME directory, see "File transfer".

mgmtpasswd

Password of the file/directory, if protected by a password.

filetype

specifies what is to be deleted:

FT_FILE
File (Default value after initialization of the parameter list ft_delpar with binary 0)

FT_DIRECTORY
Directory (not for FTAM partners)

fud

Address of a data area for the so-called "Further Details" which can indicate a more detailed cause of error if errors occur.
If NULL is specified then no more detailed error cause is output. The fud parameter is only available if delparvers is set to the value FT_DPARV2 and the options parameter is specified when ft_delete is called.

fudlen

Length of the data area for fud.
The fudlen parameter is only available if delparvers is set to the value FT_DPARV2 and the options parameter is specified when ft_delete is called.

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

0

No error. The file or directory has been deleted.

-1

Error. The file or directory has not been deleted.
The error type is stored in errorinfo.