7.14 unlink Function

Low level command to remove a file link.

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

Include

<unistd.h>

Prototype

int unlink(const char * name);

Argument

name
file to be removed

Return Value

Returns zero if successful and -1 to signify an error.

Remarks

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

This function is not provided by default and is required for remove and rename. This function deletes a link between a filename and the file contents. The contents are also deleted when the last link is destroyed. A file may have multiple links to it if the link function has been used.

Source File

unlink.c