gfal_get_results(3) - Linux man page

Name

gfal_get_results - Extracts the results from the 'gfal_internal' object

Synopsis

#include "gfal_api.h"

int gfal_get_results (gfal_internal gfal, gfal_filestatus **filestatuses);

Description

gfal_get_results Extracts the results of the last called GFAL function from the gfal_internal object.

As results are part of the gfal_internal object, you don't have to free them, they will be free with the object by the function gfal_internal_free(3).

gfal
gfal_internal object generated from user parameters.
filestatuses
pointer to a non-allocated table of gfal_filestats objects.
Results will be stored in a table of the following stuctures:

typedef struct gfal_filestatus {
char *surl;
char *turl;
int status;
char *explanation;
int pinlifetime;
struct stat64 stat;
struct gfal_filestatus_ *subpaths;
int nbsubpaths;
TFileLocality locality;
char *checksumtype;
char *checksum;
char **spacetokens;
int nbspacetokens;
} gfal_filestatus;

Result Structure Members

Keep in mind that all fields are not fulfilled by all functions!
char *surl
The SURLs concerned. Fulfilled by all functions.
char *turl
The TURL associated to the SURL in surl. Fulfilled by gfal_turlsfromsurls(3), gfal_getstatuses(3).
int status
For almost all function it corresponds to errno values ('0' means that all is ok). But for asynchronous functions, possible values are -1, 0 and 1, what correspond respectively to error, pending and done. Fulfilled by all functions.
char *explanation
Error message associated with status. Can be fulfilled by all functions, but only when SRMv2 interface is used.
int pinlifetime
Remaining pin life time for surl. Fulfilled by gfal_turlsfromsurls(3), gfal_getstatus(3), gfal_bringonline(3), gfal_prestagestatus(3) when SRMv2 interface is used.
struct stat64 stat
Stat information about the surl. It is ONLY fulfilled by gfal_ls(3).
struct gfal_filestatus *subpaths
Information about files in the directory (if there are ones) surl. It is ONLY fulfilled by gfal_ls(3) when you define srmv2_lslevels to '1' in the gfal_request object.
int nbsubpaths
Number of elements in subpaths. It is ONLY fulfilled by gfal_ls(3) when you define srmv2_lslevels to '1' in the gfal_request object.
TFileLocality locality
File locality. Possible values are: GFAL_LOCALITY_ONLINE, GFAL_LOCALITY_NEARLINE, GFAL_LOCALITY_ONLINE_USCOREAND_USCORENEARLINE, GFAL_LOCALITY_LOST, GFAL_LOCALITY_NONE, GFAL_LOCALITY_UNAVAILABLE, GFAL_LOCALITY_UNKNOWN.
char *checksumtype
Name of the checksum algorithm (for example ADLER32, MD5 ). It is ONLY filled by gfal_ls(3).
char *checksum
The checksum value. It is ONLY filled by gfal_ls(3).
char **spacetokens
The list of space tokens. Filled by gfal_prestage(3) when SRMv2 interface is used.
int nbspacetokens
Number of elements in spacetokens.

Return Value

This routine returns the number of results on a success, or -1 in case of error. In the latter case, results is defined to NULL.

See Also

gfal(3), gfal_request_new(3), gfal_internal_free(3), gfal_init(3), gfal_deletesurls(3), gfal_removedir(3), gfal_turlsfromsurls(3), gfal_ls(3), gfal_get(3), gfal_getstatus(3), gfal_prestage(3), gfal_prestagestatus(3), gfal_pin(3), gfal_release(3), gfal_abortrequest(3), gfal_abortfiles(3), gfal_set_xfer_done(3), gfal_set_xfer_running(3), gfal_get_ids(3), gfal_set_ids(3), gfal_get_results(3),

Referenced By

gfal_get_timeout_srm(3), gfal_set_timeout_srm(3), gfal_set_verbose(3), gfal_set_verbose_python(3), gfal_set_xfer_running_python(3)