summaryrefslogtreecommitdiff
path: root/usr/src/man/man3head/stat.h.3head
blob: 31670e12a3a2425ad97cf66090ec3bef00ae793b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc.  All Rights Reserved
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH STAT.H 3HEAD "Jan 22, 2015"
.SH NAME
stat.h, stat \- data returned by stat system call
.SH SYNOPSIS
.LP
.nf
#include <sys/types.h>
#include <sys/stat.h>
.fi

.SH DESCRIPTION
.LP
The system calls \fBstat()\fR, \fBlstat()\fR and \fBfstat()\fR return data in a
\fBstat\fR structure, which is defined in <\fBstat.h\fR>.
.sp
.LP
The constants used in the \fBst_mode\fR field are also defined in this file:
.sp

.sp
.TS
l l l
l l l .
#define	S_IFMT	/* type of file */
#define	S_IAMB	/* access mode bits */
#define	S_IFIFO	/* fifo */
#define	S_IFCHR	/* character special */
#define	S_IFDIR	/* directory */
#define	S_IFNAM	/* \fBXENIX\fR special named file */
#define	S_INSEM	/* \fBXENIX\fR semaphore subtype of \fBIFNAM\fR */
#define	S_INSHD	/* \fBXENIX\fR shared data subtype of \fBIFNAM\fR */
#define	S_IFBLK	/* block special */
#define	S_IFREG	/* regular */
#define	S_IFLNK	/* symbolic link */
#define	S_IFSOCK	/* socket */
#define	S_IFDOOR	/* door */
#define	S_ISUID	/* set user id on execution */
#define	S_ISGID	/* set group id on execution */
#define	S_ISVTX	/* save swapped text even after use */
#define	S_IREAD	/* read permission, owner */
#define	S_IWRITE	/* write permission, owner */
#define	S_IEXEC	/* execute/search permission, owner */
#define	S_ENFMT	/* record locking enforcement flag */
#define	S_IRWXU	/* read, write, execute: owner */
#define	S_IRUSR	/* read permission: owner */
#define	S_IWUSR	/* write permission: owner */
#define	S_IXUSR	/* execute permission: owner */
#define	S_IRWXG	/* read, write, execute: group */
#define	S_IRGRP	/* read permission: group */
#define	S_IWGRP	/* write permission: group */
#define	S_IXGRP	/* execute permission: group */
#define	S_IRWXO	/* read, write, execute: other */
#define	S_IROTH	/* read permission: other */
#define	S_IWOTH	/* write permission: other */
#define	S_IXOTH	/* execute permission: other */
.TE

.sp
.LP
The following macros are for POSIX conformance (see \fBstandards\fR(7)):
.sp

.sp
.TS
l l l
l l l .
#define	S_ISBLK(mode)	block special file
#define	S_ISCHR(mode)	character special file
#define	S_ISDIR(mode)	directory file
#define	S_ISFIFO(mode)	pipe or fifo file
#define	S_ISREG(mode)	regular file
#define	S_ISSOCK(mode)	socket file
.TE

.sp
.LP
The following symbolic constants are defined as distinct integer values outside
of the range [0, 999 999 999], for use with the \fBfutimens()\fR and
\fButimensat()\fR functions:
.sp
.in +2
.nf
#define    UTIME_NOW        use the current time
#define    UTIME_OMIT       no time change
.fi
.in -2

.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
Standard	See \fBstandards\fR(7).
.TE

.SH SEE ALSO
.LP
.BR futimens (2),
.BR stat (2),
.BR types.h (3HEAD),
.BR attributes (7),
.BR standards (7)