1DPNS_SETFSIZE(3)            DPNS Library Functions            DP‐
2NS_SETFSIZE(3)
3
4
5
6[1mNAME[0m
7       dpns_setfsize  ‐ set filesize for a regular file; set also
8last modifi‐
9       cation time to the current time
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "dpns_api.h"[0m
14
15       [1mint   dpns_setfsize  (const  char  *[4m[22mpath[24m[1m,
16struct dpns_fileid *[4m[22mfile_uniqueid[24m[1m,[0m
17       [1mu_signed64 [4m[22mfilesize[24m[1m)[0m
18
19       [1mint         dpns_setfsizec         (const          char
20*[4m[22mpath[24m[1m,   struct   dpns_fileid[0m
21       [1m*[4m[22mfile_uniqueid[24m[1m,  u_signed64  [4m[22mfile‐
22size[24m[1m, const char *[4m[22mcsumtype[24m[1m, char  *[4m[22mc‐
23sum‐[0m
24       [4mvalue[24m[1m)[0m
25
26[1mDESCRIPTION[0m
27       [1mdpns_setfsize   [22msets   the  filesize  for a regular
28file; set also the last
29       modification time to  the  current  time.   This  function
30should  only  be
31       called   by  the stager after the last write operation has
32been performed
33       on  the   file.    The   file   can   be   identified   by
34[4mpath[24m  name  or  by
35       [4mfile_uniqueid[24m.      If    both    are    specified,
36[4mfile_uniqueid[24m is used.
37
38       [4mpath[24m   specifies  the  logical  pathname   relative
39to the current DPNS
40              directory or the full DPNS pathname.
41
42       [4mcsumtype[0m
43              specifies the type of checksum. Valid types are:
44
45              [1mCS     [22mstandard 32 bits checksum
46
47              [1mAD     [22mAdler 32 bits checksum
48
49              [1mMD     [22mMD5 128 bits checksum
50
51[1mRETURN VALUE[0m
52       This routine returns 0 if the operation was successful  or
53‐1  if  the
54       operation failed. In the latter case, [1mserrno [22mis set
55appropriately.
56
57[1mERRORS[0m
58       [1mENOENT        [22mA  component  of  [4mpath[24m  prefix
59does not exist or [4mpath[24m is a
60                    null pathname.
61
62       [1mEACCES       [22mSearch permission is denied on a  com‐
63ponent  of  the  [4mpath[0m
64                    prefix   or the caller effective user ID does
65not match the
66                    owner ID of the file  or   write   permission
67on  the  file
68                    itself is denied.
69
70       [1mEFAULT        [4m[22mpath[24m  and [4mfile_uniqueid[24m
71are NULL pointers.
72
73       [1mENOTDIR      [22mA component of [4mpath[24m  prefix  is
74not a directory.
75
76       [1mEISDIR       [22mThe file is not a regular file.
77
78       [1mEINVAL        [22mThe  length  of  the  [4mcsumtype[24m
79exceeds 2 or [4mcsumtype[24m is an
80                    unknown type or the length of the [4mcsumval‐
81ue[24m exceeds 32.
82
83       [1mENAMETOOLONG  [22mThe  length  of  [4mpath[24m  exceeds
84[1mCA_MAXPATHLEN [22mor the length  of
85                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
86NAMELEN[22m.
87
88       [1mSENOSHOST    [22mHost unknown.
89
90       [1mSENOSSERV    [22mService unknown.
91
92       [1mSECOMERR     [22mCommunication error.
93
94       [1mENSNACT      [22mName server is not running or is being
95shutdown.
96
97[1mSEE ALSO[0m
98       [1mCastor_limits(4)[22m,   [1mdpns_chdir(3)[22m,    [1mdp‐
99ns_statg(3)[0m
100
101[1mAUTHOR[0m
102       [1mLCG Grid Deployment [22mTeam
103
104
105
106DPNS                     $Date: 2008/09/19 11:32:26 $         DP‐
107NS_SETFSIZE(3)
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum