_access使用方法 path
文件或目录路径。
读/写属性。
0 | 仅存在 |
2 | 只读 |
4 | 只读 |
6 | 读取和写入 |
BOOLEAN CheckFileExists(char * fileOrDirName) { if (_access(fileOrDirName, 0) == 0) //文件或目录存在 { return true; } return false; }
_access使用方法 path
文件或目录路径。
读/写属性。
0 | 仅存在 |
2 | 只读 |
4 | 只读 |
6 | 读取和写入 |
BOOLEAN CheckFileExists(char * fileOrDirName) { if (_access(fileOrDirName, 0) == 0) //文件或目录存在 { return true; } return false; }