/* * stat.h * * Copyright (c) 1993 Symantec Corporation. All rights reserved. * */ #include "time.h" #pragma once #ifdef __cplusplus extern "C" { #endif typedef short dev_t; // these would be in typedef long ino_t; typedef long off_t; typedef short mode_t; struct stat { /* "inode" information returned by stat/fstat */ dev_t st_dev; // device of the inode ino_t st_ito; // inode number short st_mode; // mode bits short st_nlink; // number of links to file int st_uid; // owner's user id int st_gid; // owner's group id dev_t st_rdev; // for special files [ignored] off_t st_size; // file size in characters time_t st_atime; // time last accessed time_t st_mtime; // time last modified time_t st_ctime; // time originally created }; #define S_IFMT 0xFFFF // type of file: #define S_IFDIR 0x0000 // directory #define S_IFCHR 0x0001 // character special [n/a] #define S_IFBLK 0x0002 // block special [n/a] #define S_IFREG 0x0003 // regular #define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR)) #define S_ISREG(m) (((m)&(S_IFMT)) == (S_IFREG)) #ifdef __cplusplus } #endif