SYNOPSIS
#include <unistd.h>
int symlink(const char *name1, const char *name2);
DESCRIPTION
The
The file to which the symbolic points is used when an
If the file named by name2 does not exist, it is created. The permission mode of name2 is 777.
PARAMETERS
- name1
-
Is the file that the symbolic link is to point to.
- name2
-
Is the name of symbolic link to be created.
RETURN VALUES
On success,
- EACCES
-
Search permission is denied on a component of name2.
- EEXIST
-
The file referenced by name2 already exists.
- EFAULT
-
name1 or name2 is an invalid pointer.
- EINVAL
-
name1 or name2 contains an invalid character.
- ENAMETOOLONG
-
The length of name1 or name2 exceeds PATH_MAX, or a path name component is longer than NAME_MAX.
- ENOENT
-
name1 or name2 points to an empty string or the name of a file that does not exist.
- ENOSPC
-
The new symbolic link cannot be created because no space is left on the file system which is to contain the link.
- ENOTDIR
-
A component of name2 is not a directory.
- EROFS
-
The new symbolic link would reside on a read-only file system.
CONFORMANCE
UNIX 98, with exceptions.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
Symbolic links are only supported on Windows 2000/XP/2003/Vista/7/2008 on local NTFS-5 file systems.
On all other supported platforms,
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
MKS Toolkit 9.3 Documentation Build 6.