int unlink(const char *pathname);
- Return value:
- On success, zero is returned. On error, -1 is returned.
- No access to the file or the path of the file.
- The system does not allow unlinking of directories.
- The file pathname cannot be unlinked because it's
being used by another process.
- pathnameptr is an invalid pointer value.
- pathname was too long.
- A directory component in pathname does not exist.
- A component of the path is not a directory.
- The file is on a read-only filesystem.
- The call was interrupted by the user.