woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

判定一个目录是否存在,使用:_access

_access, _waccess

Determine file-access permission.

int _access( const char *path, int mode );

int _waccess( const wchar_t *path, int mode );

Routine
Required Header
Optional Headers
Compatibility

_access
<io.h>
<errno.h>
Win 95, Win NT

_waccess
<wchar.h> or <io.h>
<errno.h>
Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB
Single thread static library, retail version

LIBCMT.LIB
Multithread static library, retail version

MSVCRT.LIB
Import library for MSVCRT.DLL, retail version

Return Value

Each of these functions returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or is not accessible in the given mode; in this case, errno is set as follows:

EACCES

Access denied: file’s permission setting does not allow specified access.

posted on 2011-04-19 16:48 肥仔 阅读(616) 评论(0)  编辑 收藏 引用 所属分类: Windows开发


只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理