Next: stat/fstat, Previous: rename, Up: List of Supported Calls [Contents][Index]

#### unlink

Synopsis:

      int unlink(const char *pathname);

Request:

  ‘`Funlink,pathnameptr/len`’

Return value:

  On success, zero is returned. On error, -1 is returned.

Errors:
  `EACCES`

    No access to the file or the path of the file.

  `EPERM`

    The system does not allow unlinking of directories.

  `EBUSY`

    The file pathname cannot be unlinked because it’s being used by another process.

  `EFAULT`

    pathnameptr is an invalid pointer value.

  `ENAMETOOLONG`

    pathname was too long.

  `ENOENT`

    A directory component in pathname does not exist.

  `ENOTDIR`

    A component of the path is not a directory.

  `EROFS`

    The file is on a read-only filesystem.

  `EINTR`

    The call was interrupted by the user.