RTEMS Logo

RTEMS 4.10.2 On-Line Library


Files and Directories Manager unlink - Removes a directory entry

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.18: unlink - Removes a directory entry

CALLING SEQUENCE:

#include <unistd.h>

int unlink(
  const char path
);

STATUS CODES:

EACCES
Search permission is denied for a directory in a file's path prefix
EBUSY
The directory is in use.
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in effect.
ENOENT
A file or directory does not exist.
ENOTDIR
A component of the specified path was not a directory when a directory was expected.
EPERM
Operation is not permitted. Process does not have the appropriate priviledges or permissions to perform the requested operations.
EROFS
Read-only file system.

DESCRIPTION:

The unlink function removes the link named by path and decrements the link count of the file referenced by the link. When the link count goes to zero and no process has the file open, the space occupied by the file is freed and the file is no longer accessible.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2008 OAR Corporation