Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Headersstat(3HEAD)


NAME

 stat - data returned by stat system call

SYNOPSIS

 
#include <sys/types.h>
 
#include <sys/stat.h>

DESCRIPTION

 

The system calls stat, lstat and fstat return data in a stat structure, which is defined in <stat.h>.

The constants used in the st_mode field are also defined in this file:

#defineS_IFMT/* type of file */
#defineS_IAMB/* access mode bits */
#defineS_IFIFO/* fifo */
#defineS_IFCHR/* character special */
#defineS_IFDIR/* directory */
#defineS_IFNAM/* XENIX special named file */
#defineS_INSEM/* XENIX semaphore subtype of IFNAM */
#defineS_INSHD/* XENIX shared data subtype of IFNAM */
#defineS_IFBLK/* block special */
#defineS_IFREG/* regular */
#defineS_IFLNK/* symbolic link */
#defineS_IFSOCK/* socket */
#defineS_IFDOOR/* door */
#defineS_ISUID/* set user id on execution */
#defineS_ISGID/* set group id on execution */
#defineS_ISVTX/* save swapped text even after use */
#defineS_IREAD/* read permission, owner */
#defineS_IWRITE/* write permission, owner */
#defineS_IEXEC/* execute/search permission, owner */
#defineS_ENFMT/* record locking enforcement flag */
#defineS_IRWXU/* read, write, execute: owner */
#defineS_IRUSR/* read permission: owner */
#defineS_IWUSR/* write permission: owner */
#defineS_IXUSR/* execute permission: owner */
#defineS_IRWXG/* read, write, execute: group */
#defineS_IRGRP/* read permission: group */
#defineS_IWGRP/* write permission: group */
#defineS_IXGRP/* execute permission: group */
#defineS_IRWXO/* read, write, execute: other */
#defineS_IROTH/* read permission: other */
#defineS_IWOTH/* write permission: other */
#defineS_IXOTH/* execute permission: other */

The following macros are for POSIX conformance (see standards(5)):

#defineS_ISBLK(mode)block special file
#defineS_ISCHR(mode)character special file
#defineS_ISDIR(mode)directory file
#defineS_ISFIFO(mode)pipe or fifo file
#defineS_ISREG(mode)regular file
#defineS_ISSOCK(mode)socket file

SEE ALSO

 

stat(2), standards(5), types(3HEAD)


SunOS 5.9Go To TopLast Changed 21 Mar 1997

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.