Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-229
unlink (supplementary)
unlink (supplementary)
The unlink function purges a disk file. Refer to “remove” on page 3-153 for an
equivalent standard function.
file_name
points to a string that contains a valid file name.
Return Value
is zero if the operation is successful, or -1 if an error occurs.
Usage Guidelines
•
You can call unlink only for closed files.
Example
This example purges the file $a.b.c:
#include <fcntlh>
short status;
status = unlink("$a.b.c");
#include <fcntlh>
short unlink(char *file_name);