SYMLINK

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

symlink - make symbolic link to a file  

SYNOPSIS

#include <support.h>

int symlink(const char *old, const char *new);
 

DESCRIPTION

A symbolic link new is created to old (new is the name of the file created, old is the string used in creating the symbolic link). Either name may be an arbitrary path name; the files need not be on the same file system. The file that the symbolic link points to is used when an open operation is performed on the link. A stat on a symbolic link returns the linked-to file, while an lstat returns information about the link itself. This can lead to suprising results when a symbolic link is made to a directory. To avoid confusion in programs, the readlink call can be used to read the contents of a symbolic link.  

RETURN VALUES

symlink returns:
 0 on success -1 on failure; errno is set to indicate the error  

SEE ALSO

link(3), readlink(3), unlink(3), Fsymlink(2)  

NOTES

MS-DOS (TOS) file-systems do not support symbolic links. The file or directory linked to (old) need not exist.
 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
NOTES

This document was created by man2html, using the manual pages.
Time: 11:15:12 GMT, June 22, 2025