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

📄 ac

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@c ----------------------------------------------------------------------
@node access, file system
@heading @code{access}
@subheading Syntax

@example
#include <unistd.h>

int access(const char *filename, int flags);
@end example

@subheading Description

This function determines what kind of access modes a given file allows. 
The parameter @var{flags} is the logical @code{or} of one or more of the
following flags:

@table @code

@item R_OK

Request if the file is readable.  Since all files are readable under
MS-DOS, this access mode always exists. 

@item W_OK

Request if the file is writable.

@item X_OK

Request if the file is executable.  This flag currently has no affect. 

@item F_OK

Request if the file exists.

@end table

@subheading Return Value

Zero if the requested access mode is allowed, nonzero if not. 

@subheading Example

@example
if (access("file.ext", W_OK))
  return ERROR_CANNOT_WRITE;
open("file.ext", O_RDWR);
@end example

⌨️ 快捷键说明

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