⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unlink.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
字号:
.func unlink _wunlink
#include <&iohdr>
int unlink( const char *path );
.ixfunc2 '&FileOp' &func
.if &'length(&wfunc.) ne 0 .do begin
int _wunlink( const wchar_t *path );
.ixfunc2 '&FileOp' &wfunc
.ixfunc2 '&Wide' &wfunc
.do end
.if &'length(&ufunc.) ne 0 .do begin
int _uunlink( const wchar_t *path );
.ixfunc2 '&FileOp' &ufunc
.do end
.funcend
.desc begin
The &func function deletes the file whose name is the string
pointed to by
.arg path.
This function is equivalent to the
.kw remove
function.
.if &'length(&wfunc.) ne 0 .do begin
.np
The &wfunc function is identical to &func except that it accepts a
wide-character string argument.
.do end
.if &'length(&ufunc.) ne 0 .do begin
.np
The &ufunc Unicode function is identical to &func except that it
accepts a Unicode string argument.
.do end
.desc end
.return begin
The &func
function returns zero if the operation succeeds, non-zero if it fails.
.return end
.if '&machsys' eq 'QNX' .do begin
.error begin
.begterm 12
.term EACCES
Search permission is denied for a component of
.arg path
or write permission is denied on the directory containing the link to
be removed.
.if '&machsys' eq 'QNX' .do begin
.term EBUSY
The directory named by the
.arg path
argument cannot be unlinked because it is being used by the system or
another process and the implementation considers this to be an error.
.term ENAMETOOLONG
The argument
.arg path
exceeds {PATH_MAX} in length, or a pathname component is longer than
{NAME_MAX}.
.do end
.term ENOENT
The named file does not exist or
.arg path
is an empty string.
.if '&machsys' eq 'QNX' .do begin
.term ENOTDIR
A component of
.arg path
is not a directory.
.term EPERM
The file named by
.arg path
is a directory and either the calling process does not have the
appropriate privileges, or the implementation prohibits using &func on
directories.
.term EROFS
The directory entry to be unlinked resides on a read-only file system.
.do end
.endterm
.error end
.do end
.see begin
.if '&machsys' eq 'QNX' .do begin
.seelist unlink chdir chmod close getcwd link mkdir open remove rename rmdir stat
.do end
.el .do begin
.seelist unlink chdir chmod close getcwd mkdir open remove rename rmdir stat
.do end
.see end
.exmp begin
#include <&iohdr>

void main()
  {
    unlink( "vm.tmp" );
  }
.exmp end
.class POSIX 1003.1
.system

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -