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