- 1. 关键词
- 2. filesystem.h
- 3. filesystem_unix.cpp
- 4. filesystem_win.cpp
- 5. filepath.h & filepath.cpp
- 6. 测试代码
- 7. 运行结果
- 8. 源码地址
1. 关键词
关键词:
C++ 文件路径处理 文件 是否存在 是否可读 是否可写 是否可执行 跨平台
应用场景:
在对文件进行操作之前,对文件的访问权限进行判断。
2. filesystem.h
3. filesystem_unix.cpp
4. filesystem_win.cpp
5. filepath.h & filepath.cpp
参考:
https://gitee.com/spencer_luo/common_util/blob/master/src/common_util/filepath.h
https://gitee.com/spencer_luo/common_util/blob/master/src/common_util/filepath.cpp
6. 测试代码
7. 运行结果
8. 源码地址
更多详细代码,请查看本人写的C++ 通用工具库: common_util, 本项目已开源,代码简洁,且有详细的文档和Demo。
本文由博客一文多发平台 OpenWrite 发布!