1stat.h(3HEAD) Headers stat.h(3HEAD)
2
3
4
6 stat.h, stat - data returned by stat system call
7
9 #include <sys/types.h>
10 #include <sys/stat.h>
11
12
14 The system calls stat(), lstat() and fstat() return data in a stat
15 structure, which is defined in <stat.h>.
16
17
18 The constants used in the st_mode field are also defined in this file:
19
20
21
22
23 #define S_IFMT /* type of file */
24 #define S_IAMB /* access mode bits */
25 #define S_IFIFO /* fifo */
26 #define S_IFCHR /* character special */
27 #define S_IFDIR /* directory */
28 #define S_IFNAM /* XENIX special named file */
29 #define S_INSEM /* XENIX semaphore subtype of IFNAM */
30 #define S_INSHD /* XENIX shared data subtype of IFNAM */
31 #define S_IFBLK /* block special */
32 #define S_IFREG /* regular */
33 #define S_IFLNK /* symbolic link */
34 #define S_IFSOCK /* socket */
35 #define S_IFDOOR /* door */
36 #define S_ISUID /* set user id on execution */
37 #define S_ISGID /* set group id on execution */
38 #define S_ISVTX /* save swapped text even after use */
39 #define S_IREAD /* read permission, owner */
40 #define S_IWRITE /* write permission, owner */
41 #define S_IEXEC /* execute/search permission, owner */
42 #define S_ENFMT /* record locking enforcement flag */
43 #define S_IRWXU /* read, write, execute: owner */
44 #define S_IRUSR /* read permission: owner */
45 #define S_IWUSR /* write permission: owner */
46 #define S_IXUSR /* execute permission: owner */
47 #define S_IRWXG /* read, write, execute: group */
48 #define S_IRGRP /* read permission: group */
49 #define S_IWGRP /* write permission: group */
50 #define S_IXGRP /* execute permission: group */
51 #define S_IRWXO /* read, write, execute: other */
52 #define S_IROTH /* read permission: other */
53 #define S_IWOTH /* write permission: other */
54 #define S_IXOTH /* execute permission: other */
55
56
57
58 The following macros are for POSIX conformance (see standards(5)):
59
60
61
62
63 #define S_ISBLK(mode) block special file
64 #define S_ISCHR(mode) character special file
65 #define S_ISDIR(mode) directory file
66
67 #define S_ISFIFO(mode) pipe or fifo file
68 #define S_ISREG(mode) regular file
69 #define S_ISSOCK(mode) socket file
70
71
72
73 The following symbolic constants are defined as distinct integer values
74 outside of the range [0, 999 999 999], for use with the futimens() and
75 utimensat() functions:
76
77 #define UTIME_NOW use the current time
78 @define UTIME_OMIT no time change
79
80
82 See attributes(5) for descriptions of the following attributes:
83
84
85
86
87 ┌─────────────────────────────┬─────────────────────────────┐
88 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
89 ├─────────────────────────────┼─────────────────────────────┤
90 │Interface Stability │Committed │
91 ├─────────────────────────────┼─────────────────────────────┤
92 │Standard │See standards(5). │
93 └─────────────────────────────┴─────────────────────────────┘
94
96 futimens(2), stat(2), types.h(3HEAD), attributes(5), standards(5)
97
98
99
100SunOS 5.11 1 Sep 2009 stat.h(3HEAD)