Boost FileSystem 库使用说明2
来源:互联网 发布:头北脚南睡觉好吗知乎 编辑:程序博客网 时间:2024/06/05 04:44
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
using namespace boost::filesystem;
//文件属性
CString strPath=_T("d:\\a.txt");
wpath p(strPath.GetBuffer());
bool bIsDirectory=is_directory(p);
wstring sPath=p.wstring();
wstring sroot_path=p.root_path().wstring();
wstring sleaf=p.leaf().wstring();
wstring sfilename=p.filename().wstring();
wstring sExtension=p.extension().wstring();
CString str;
str.Format(_T("bIsDirectory = %d \npath= %s \nsExtension= %s \n sroot_path= %s \n sfilename= %s \nsleaf= %s"),
bIsDirectory,
sPath.c_str(),
sExtension.c_str(),
sroot_path.c_str(),
sfilename.c_str(),
sleaf.c_str());
AfxMessageBox(str);
//遍历目录所有文件
directory_iterator diend;
for (directory_iterator pos("d:\\");pos!=diend; ++pos)
{
wpath p=pos->path();
wstring s=p.wstring();
CString str;
str.Format(_T("%s %d"),s.c_str(),is_directory(p));
AfxMessageBox(str);
}
- Boost FileSystem 库使用说明2
- boost Filesystem 库
- boost库filesystem使用问题
- boost::filesystem库使用入门
- boost::filesystem 库(文件系统)
- boost.filesystem
- Boost.Filesystem
- boost filesystem
- Boost.Filesystem
- Boost::Filesystem
- boost filesystem
- boost::filesystem
- boost库使用说明
- boost的filesystem库有待改进
- boost中filesystem库的使用
- 学习boost之filesystem
- boost::filesystem使用手册
- boost filesystem 使用
- Ultraedit 下载与破解
- listview加载性能优化ViewHolder
- JAVA面试题解惑系列(九)——继承、多态、重载和重写
- 浏览器内核
- 讲师招募
- Boost FileSystem 库使用说明2
- hdu 1849 Rabbit and Grass
- WinSock2编程之打造完整的SOCKET池
- c++的三种继承方式
- 运用Autoconf和Automake生成Makefile的学习之路
- linux shell 显示颜色字体
- C/C++宏的使用总结
- Spring 工作原理
- linux下使用yum安装mysql