Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 1 | /* Rmdir for the Macintosh. |
| 2 | Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). |
| 3 | Pathnames must be Macintosh paths, with colons as separators. */ |
| 4 | |
| 5 | #include "macdefs.h" |
| 6 | |
| 7 | int |
| 8 | rmdir(path) |
| 9 | char *path; |
| 10 | { |
| 11 | IOParam pb; |
Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 12 | |
Jack Jansen | 67132b3 | 1995-01-18 13:55:41 +0000 | [diff] [blame] | 13 | pb.ioNamePtr= (StringPtr) Pstring(path); |
Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 14 | pb.ioVRefNum= 0; |
| 15 | if (PBDelete((ParmBlkPtr)&pb, FALSE) != noErr) { |
| 16 | errno= EACCES; |
| 17 | return -1; |
| 18 | } |
| 19 | return 0; |
| 20 | } |