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