106 lines
3.1 KiB
Groff
106 lines
3.1 KiB
Groff
'\"! tbl | mmdoc
|
|
'\"macro stdmacro
|
|
.if n .pH g5.stat @(#)stat 41.3 of 5/26/91
|
|
.\" Copyright 1991 UNIX System Laboratories, Inc.
|
|
.\" Copyright 1989, 1990 AT&T
|
|
.nr X
|
|
.if \nX=0 .ds x} stat 5 "" "\&"
|
|
.if \nX=1 .ds x} stat 5 ""
|
|
.if \nX=2 .ds x} stat 5 "" "\&"
|
|
.if \nX=3 .ds x} stat "" "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
\f4stat\f1 \- data returned by \f4stat\fP system call
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f4#include <sys/types.h>\f1
|
|
\f4#include <sys/stat.h>\f1
|
|
.fi
|
|
.SH DESCRIPTION
|
|
The system calls
|
|
\f4stat\fP, \f4lstat\fP and \f4fstat\fP return data in a \f4stat\f1
|
|
structure, which is defined in
|
|
\f4stat.h\f1 and includes the following members:
|
|
.columns 2 3 3
|
|
.TS
|
|
lf4 lf4 lf4.
|
|
dev_t st_dev;
|
|
ino_t st_ino;
|
|
mode_t st_mode;
|
|
nlink_t st_nlink;
|
|
uid_t st_uid;
|
|
gid_t st_gid;
|
|
dev_t st_rdev;
|
|
off_t st_size;
|
|
timespec_t st_atim;
|
|
timespec_t st_mtim;
|
|
timespec_t st_ctim;
|
|
long st_blksize;
|
|
blkcnt_t st_blocks;
|
|
char st_fstype[_ST_FSTYPSZ];
|
|
.TE
|
|
.PP
|
|
The constants used in the
|
|
\f4st_mode\f1
|
|
field are also defined in this file:
|
|
.columns 2 2 2
|
|
.TS
|
|
lf4 lf4 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 /\(** \f4XENIX\fP special named file \(**/
|
|
#define S_INSEM /\(** \f4XENIX\fP semaphore subtype of IFNAM \(**/
|
|
#define S_INSHD /\(** \f4XENIX\fP shared data subtype of IFNAM \(**/
|
|
#define S_IFBLK /\(** block special \(**/
|
|
#define S_IFREG /\(** regular \(**/
|
|
#define S_IFLNK /\(** symbolic link \(**/
|
|
#define S_IFSOCK /\(** socket \(**/
|
|
#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
|
|
The following macros are for
|
|
POSIX conformance:
|
|
.columns 2 2 4
|
|
.TS
|
|
lf4 l.
|
|
#define S_ISBLK(mode) \f1block special file\f4
|
|
#define S_ISCHR(mode) \f1character special file\f4
|
|
#define S_ISDIR(mode) \f1directory file\f4
|
|
#define S_ISFIFO(mode) \f1pipe or fifo file\f4
|
|
#define S_ISREG(mode) \f1regular file
|
|
.TE
|
|
Additional macros that have been defined:
|
|
.columns 3 5
|
|
.TS
|
|
lf4 l.
|
|
#define S_ISLNK(mode) \f1symbolic link\f4
|
|
#define S_ISSOCK(mode) \f1socket
|
|
.TE
|
|
.PP
|
|
.SH SEE ALSO
|
|
stat(2),
|
|
stat64(2),
|
|
stat64(5),
|
|
types(5)
|
|
.\" @(#)stat.5 6.2 of 9/6/83
|