dosunlink
Purpose
Unlinks (deletes) a DOS file.
Library
DOS Services Library (libdos.a)
Syntax
#include <dos.h>
int dosunlink (path)
char *path;
Description
The dosunlink subroutine deletes the directory entry
named by the path parameter.
The file is removed from the file system if it is a DOS
file or if it is an AIX file with no other links to it.
The dosunlink subroutine fails if the invoking process
does not have write access to the file being removed and
to the directory in which it is contained. It is suc-
cessful if the file is in use, but the file is not
deleted until all users have closed it.
The directory entry is removed upon return to dosunlink,
but all users who had the file open when dosunlink was
called still have a local copy for their use.
Return Value
Upon successful completion, a value of 0 is returned. If
the dosunlink subroutine fails, a value of -1 is returned
and doserrno is set to indicate the error.
Related Information
In this book: "DOS services library," "doscreate,"
"dosopen," and "dosrename."