blob: 2e406c280cc06f091345d8b4b03b27dad51dcc41 [file] [log] [blame]
Guido van Rossumd4d77281994-08-19 10:51:31 +00001/* 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
7int
8rmdir(path)
9 char *path;
10{
11 IOParam pb;
Guido van Rossumd4d77281994-08-19 10:51:31 +000012
Jack Jansen67132b31995-01-18 13:55:41 +000013 pb.ioNamePtr= (StringPtr) Pstring(path);
Guido van Rossumd4d77281994-08-19 10:51:31 +000014 pb.ioVRefNum= 0;
15 if (PBDelete((ParmBlkPtr)&pb, FALSE) != noErr) {
16 errno= EACCES;
17 return -1;
18 }
19 return 0;
20}