Next: stat/fstat, Previous: rename, Up: List of Supported Calls [Contents][Index]
int unlink(const char *pathname);
‘Funlink,pathnameptr/len’
On success, zero is returned. On error, -1 is returned.
EACCESNo access to the file or the path of the file.
EPERMThe system does not allow unlinking of directories.
EBUSYThe file pathname cannot be unlinked because it’s being used by another process.
EFAULTpathnameptr is an invalid pointer value.
ENAMETOOLONGpathname was too long.
ENOENTA directory component in pathname does not exist.
ENOTDIRA component of the path is not a directory.
EROFSThe file is on a read-only filesystem.
EINTRThe call was interrupted by the user.