1LFC_SETFSIZE(3) LFC Library Functions LFC_SETFSIZE(3)
2
3
4
6 lfc_setfsize - set filesize for a regular file; set also last modifica‐
7 tion time to the current time
8
10 #include <sys/types.h>
11 #include "lfc_api.h"
12
13 int lfc_setfsize (const char *path, struct lfc_fileid *file_uniqueid,
14 u_signed64 filesize)
15
16 int lfc_setfsizec (const char *path, struct lfc_fileid *file_uniqueid,
17 u_signed64 filesize, const char *csumtype, char *csumvalue)
18
20 lfc_setfsize sets the filesize for a regular file; set also the last
21 modification time to the current time. This function should only be
22 called by the stager after the last write operation has been performed
23 on the file. The file can be identified by path name or by
24 file_uniqueid. If both are specified, file_uniqueid is used.
25
26 path specifies the logical pathname relative to the current LFC
27 directory or the full LFC pathname.
28
29 csumtype
30 specifies the type of checksum. Valid types are:
31
32 CS standard 32 bits checksum
33
34 AD Adler 32 bits checksum
35
36 MD MD5 128 bits checksum
37
39 This routine returns 0 if the operation was successful or -1 if the
40 operation failed. In the latter case, serrno is set appropriately.
41
43 ENOENT A component of path prefix does not exist or path is a
44 null pathname.
45
46 EACCES Search permission is denied on a component of the path
47 prefix or the caller effective user ID does not match the
48 owner ID of the file or write permission on the file
49 itself is denied.
50
51 EFAULT path and file_uniqueid are NULL pointers.
52
53 ENOTDIR A component of path prefix is not a directory.
54
55 EISDIR The file is not a regular file.
56
57 EINVAL The length of the csumtype exceeds 2 or csumtype is an
58 unknown type or the length of the csumvalue exceeds 32.
59
60 ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of
61 a path component exceeds CA_MAXNAMELEN.
62
63 SENOSHOST Host unknown.
64
65 SENOSSERV Service unknown.
66
67 SECOMERR Communication error.
68
69 ENSNACT Name server is not running or is being shutdown.
70
72 Castor_limits(4), lfc_chdir(3), lfc_statg(3)
73
75 LCG Grid Deployment Team
76
77
78
79LFC $Date: 2008/09/19 11:32:26 $ LFC_SETFSIZE(3)