unlink

Name

unlink -- remove a directory entry

Synopsis

int unlink(const char *path);

Description

The specification for "unlink" is as specified in the SUSv2 but with the following differences as listed below.

See also 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 SUSv2. [1]

Notes

[1]

The Linux kernel has deliberately chosen EISDIR for this case and does not expect to change (Al Viro, personal communication).