SYNOPSIS
#include <unistd.h>
int unlink(const char *pathname);
DESCRIPTION
The
Upon successful completion,
PARAMETERS
RETURN VALUES
If successful, the
- EACCES
-
Search permission is denied for a component of the pathname prefix.
Write permission is denied on the directory that contains the link to be removed.
- EBUSY
-
The directory entry to be unlinked is in use by the system or another process and the file could not be moved to a hidden area.
- EFAULT
-
pathname is an invalid pointer.
- ENAMETOOLONG
-
The length of the pathname parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.
- ENOENT
-
The named file does not exist or pathname points to an empty string or a component of the pathname prefix is not a directory.
- EPERM
-
The file named by pathname is a directory.
- EROFS
-
The directory entry to be unlinked is part of a read-only file system.
- ETXTBSY
-
The directory entry to be unlinked is in use.
CONFORMANCE
POSIX.1 (1996), with exceptions.
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
Because of limitations on Windows, if one or more processes have the file open when the last link is removed, and if the file can be moved, the NuTCRACKER Platform moves the file to a hidden area on the drive, so that the directory entry is deleted. The file moved to the hidden area resides there until the last handle to that file is closed.
The
File names are treated as multibyte sequences and are converted to Unicode (UTF-16)
before passing to Win32. The conversion is either performed based on the
current thread locale, set using
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.