Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 1 | /* Include file belonging to stat emulator. |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 2 | Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). |
| 3 | Updated August 1994. */ |
Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 5 | struct macstat { |
| 6 | unsigned short st_dev; |
| 7 | unsigned long st_ino; |
Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 8 | unsigned short st_mode; |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 9 | unsigned short st_nlink; |
| 10 | unsigned short st_uid; |
| 11 | unsigned short st_gid; |
| 12 | unsigned short st_rdev; |
Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 13 | unsigned long st_size; |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 14 | unsigned long st_atime; |
Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 15 | unsigned long st_mtime; |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 16 | 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 Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 21 | }; |
| 22 | |
Guido van Rossum | e783444 | 1994-08-26 09:09:48 +0000 | [diff] [blame] | 23 | #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 Jansen | a0e76be | 1995-06-09 20:39:24 +0000 | [diff] [blame] | 29 | |
Jack Jansen | 9ae898b | 2000-07-11 21:16:03 +0000 | [diff] [blame^] | 30 | extern int macstat(char *, struct macstat *); |
Jack Jansen | a0e76be | 1995-06-09 20:39:24 +0000 | [diff] [blame] | 31 | /* To stop inclusion of MWerks header: */ |
| 32 | #ifndef _STAT |
| 33 | #define _STAT |
| 34 | #endif |