blob: d6cad8519421c3a0eecddcac7b6e0ea09869bb16 [file] [log] [blame]
Guido van Rossume7834441994-08-26 09:09:48 +00001/* Include file belonging to stat emulator.
Guido van Rossum739267b1994-08-29 08:42:37 +00002 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
3 Updated August 1994. */
Guido van Rossume7834441994-08-26 09:09:48 +00004
Guido van Rossum739267b1994-08-29 08:42:37 +00005struct macstat {
6 unsigned short st_dev;
7 unsigned long st_ino;
Guido van Rossume7834441994-08-26 09:09:48 +00008 unsigned short st_mode;
Guido van Rossum739267b1994-08-29 08:42:37 +00009 unsigned short st_nlink;
10 unsigned short st_uid;
11 unsigned short st_gid;
12 unsigned short st_rdev;
Guido van Rossume7834441994-08-26 09:09:48 +000013 unsigned long st_size;
Guido van Rossum739267b1994-08-29 08:42:37 +000014 unsigned long st_atime;
Guido van Rossume7834441994-08-26 09:09:48 +000015 unsigned long st_mtime;
Guido van Rossum739267b1994-08-29 08:42:37 +000016 unsigned long st_ctime;
17 /* Non-standard additions */
18 unsigned long st_rsize; /* Resource size */
19 char st_type[4]; /* File type, e.g. 'APPL' or 'TEXT' */
20 char st_creator[4]; /* File creator, e.g. 'PYTH' */
Guido van Rossume7834441994-08-26 09:09:48 +000021};
22
Guido van Rossume7834441994-08-26 09:09:48 +000023#define S_IFMT 0170000L
24#define S_IFDIR 0040000L
25#define S_IFREG 0100000L
26#define S_IREAD 0400
27#define S_IWRITE 0200
28#define S_IEXEC 0100
Jack Jansena0e76be1995-06-09 20:39:24 +000029
Jack Jansen9ae898b2000-07-11 21:16:03 +000030extern int macstat(char *, struct macstat *);
Jack Jansena0e76be1995-06-09 20:39:24 +000031/* To stop inclusion of MWerks header: */
32#ifndef _STAT
33#define _STAT
34#endif