文件存在、权限检测

来源:互联网 发布:eago人工智能骗局 编辑:程序博客网 时间:2024/06/07 13:05
文件存在、权限检测

检测文件是否存在,是否具有读写权限等:
int _access(  const char *path,  int mode );

检测一个文件是否存在,使用api:

PathFileExists(LPCTSTR pszPath);

判断一个路径是否是文件夹:

BOOL PathIsDirectory(LPCTSTR pszPath);

Returns TRUE if the path is a valid directory, or FALSE otherwise. 

0 0