1DPM_RM(3) DPM Library Functions DPM_RM(3)
2
3
4
6 dpm_rm - delete a set of files
7
9 #include <sys/types.h>
10 #include "dpm_api.h"
11
12 int dpm_rm (int nbsurls, char **surls, int *nbreplies, struct
13 dpm_filestatus **filestatuses)
14
16 dpm_rm deletes a set of files from disk and from the name space.
17
18 The input arguments are:
19
20 nbsurls
21 specifies the number of files belonging to the request.
22
23 surls specifies the array of file names.
24
25 The output arguments are:
26
27 nbreplies
28 will be set to the number of replies in the array of file sta‐
29 tuses.
30
31 filestatuses
32 will be set to the address of an array of dpm_filestatus struc‐
33 tures allocated by the API. The client application is responsi‐
34 ble for freeing the array when not needed anymore.
35
36 struct dpm_filestatus {
37 char *surl;
38 int status;
39 char *errstring;
40 };
41
43 This routine returns 0 if the operation was successful or -1 if the
44 operation failed. In the latter case, serrno is set appropriately.
45
47 EFAULT surls, nbreplies or filestatuses is a NULL pointer.
48
49 ENOMEM Memory could not be allocated for marshalling the request.
50
51 EINVAL nbsurls is not strictly positive or all file requests have
52 errors.
53
54 SENOSHOST Host unknown.
55
56 SEINTERNAL Database error.
57
58 SECOMERR Communication error.
59
60
61
62LCG $Date: 2004/12/15 08:31:49 $ DPM_RM(3)