RTEMS 4.7.99.2 On-Line Library
Files and Directories Manager link - Creates a link to a file
RTEMS POSIX API User's Guide
4.4.13: link - Creates a link to a file
CALLING SEQUENCE:
-
#include <unistd.h>
int link(
const char *existing,
const char *new
);
STATUS CODES:
- EACCES
-
Search permission is denied for a directory in a file's path prefix
- EEXIST
-
The named file already exists.
- EMLINK
-
The number of links would exceed
LINK_MAX
.
- ENAMETOOLONG
-
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in
effect.
- ENOENT
-
A file or directory does not exist.
- ENOSPC
-
No space left on disk.
- ENOTDIR
-
A component of the specified pathname 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.
- EXDEV
-
Attempt to link a file to another file system.
DESCRIPTION:
The link()
function atomically creates a new link for an existing file
and increments the link count for the file.
If the link()
function fails, no directories are modified.
The existing
argument should not be a directory.
The caller may (or may not) need permission to access the existing file.
NOTES:
NONE
RTEMS POSIX API User's Guide
Copyright © 1988-2004 OAR Corporation