link Function

Create a new file.

Attention: This interface function is implemented only by MPLAB XC32 C compilers.

Include

<unistd.h>

Prototype

int link(const char * existing, const char * new);

Arguments

existing
filename from which to link
new
destination filename of link

Return Value

Zero is returned to indicate success, and -1 is returned to indicate an error condition.

Remarks

This function is implemented as a stub that must be completed to suite the application.

This function is not provided by default. Its purpose, in a file system, is to create a new filename, new, which contains the same data as the file named existing. The errno object should also be set on error. This function is used by rename.

Source File

link.c