Subject: How do I delete an empty directory?
To: None <riscbsd@nethotel.dk>
From: Ib-Michael Martinsen <imm@nethotel.dk>
List: port-arm32
Date: 11/16/1997 20:02:46
Hi there!

The header says it all. I can delete a file using the unlink function,
but when I use unlink on an empty directory, it returns -1 and errno
is set to 21.

'man errno' shows

21 EISDIR Is a directory. An attempt was made to open a directory with
             write mode specified.

I guess the directory in case must be the parent directory to the one I
want to delete. The user (owner) has write access to both directories.

Furthermore, according to 'man unlink' the error EISDIR can not happen
at all, so why does it?

Is there any other way to delete a directory?

Best regards
   Ib-Michael
--
Ib-Michael Martinsen
Email at work: imm@kmd.dk
Email at home: imm@nethotel.dk
Fidomail:      2:234/181.9

Using an Acorn RiscPC with a 202.4 MHz StrongArm processor :-)