unlink

Name

unlink -- remove a directory entry

Synopsis

int unlink(const char * path);

Description

unlink() is as specified in POSIX 1003.1-2008 (ISO/IEC 9945-2009), but with differences as listed below.

See also Section 18.1, Additional behaviors: unlink/link on directory.

May return EISDIR on directories

If path specifies a directory, the implementation may return EISDIR instead of EPERM as specified by POSIX 1003.1-2008 (ISO/IEC 9945-2009).

Rationale: The Linux kernel has deliberately chosen EISDIR for this case and does not expect to change.