26.boost文件库
#define _CRT_SECURE_NO_WARNINGS
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem.hpp>
#include <iostream>
using namespace std;
using namespace boost; void main()
{
boost::filesystem::directory_iterator begin("C:\\");
boost::filesystem::directory_iterator end; for (; begin != end; begin++)
{
//文件状态
boost::filesystem::file_status fs = begin->status(); switch (fs.type())
{
case boost::filesystem::regular_file:
cout << "标准文件" << endl;
break;
case boost::filesystem::symlink_file:
cout << "操作系统文件" << endl;
break;
case boost::filesystem::directory_file:
cout << "文件夹" << endl;
break;
default:
break;
}
cout << begin->path() << endl;
}
cin.get();
}
26.boost文件库的更多相关文章
- Boost Thread学习笔记
thread自然是boost::thread库的主 角,但thread类的实现总体上是比较简单的,前面已经说过,thread只是一个跨平台的线程封装库,其中按照所使用的编译选项的不同,分别决定使用 W ...
- C++内存管理学习笔记(5)
/****************************************************************/ /* 学习是合作和分享式的! /* Auth ...
- Boost.Asio c++ 网络编程翻译(26)
Boost.Asio-其他特性 这章我们讲了解一些Boost.Asio不那么为人所知的特性.标准的stream和streambuf对象有时候会更难用一些,但正如你所见.它们也有它们的益处.最后,你会看 ...
- [.net 面向对象程序设计进阶] (26) 团队开发利器(五)分布式版本控制系统Git——图形化Git客户端工具TortoiseGit
[.net 面向对象程序设计进阶] (26) 团队开发利器(五)分布式版本控制系统Git——图形化Git客户端工具TortoiseGit 读前必备: 接上篇: 分布式版本控制系统Git——使用GitS ...
- BOOST.Asio——Tutorial
=================================版权声明================================= 版权声明:原创文章 谢绝转载 啥说的,鄙视那些无视版权随 ...
- boost字符串算法
boost::algorithm简介 2007-12-08 16:59 boost::algorithm提供了很多字符串算法,包括: 大小写转换: 去除无效字符: 谓词: 查找: 删除/替换: 切割: ...
- boost解析json
#include <QtCore/QCoreApplication> #include <boost/property_tree/ptree.hpp> #include < ...
- Linux上安装使用boost入门指导
Data Mining Linux上安装使用boost入门指导 获得boost boost分布 只需要头文件的库 使用boost建立一个简单的程序 准备使用boost二进制文件库 把你的程序链接到bo ...
- boost库区间range基本原理及使用实例
由 www.169it.com 搜集整理 区间的概念类似于STL中的容器概念.一个区间提供了可以访问半开放区间[first,one_past_last)中元素的迭代器,还提供了区间中的元素数量的信息. ...
随机推荐
- Linux就该这么学 20181007(第十一章ftp)
参考链接https://www.linuxprobe.com/ iptables -F #ftp 21端口 #主动模式,被动模式 #匿名用户 本地用户 虚拟用户 vim /etc/vsftpd/vsf ...
- POJ 2665 模拟,,
It is confirmed that these sections do not overlap with each other. 一句话 就变成水题了,,, // by SiriusRen #i ...
- java8 stream 流 例子
Trader raoul = new Trader("Raoul", "Cambridge"); Trader mario = new Trader(" ...
- 搭建svn服务器(ubuntu)
ubuntu搭建svn服务器 环境:ubuntu 12.04.5 apt-get install subversion 找个目录作为svn的仓库 mkdir svn svnadmin create s ...
- ZBrush2018中文版全球同步发售,终身授权
ZBrush 2018于2018.3.28发布了!这个我们期待已久的2018新版本等了几年,它终于来了! 不负众望,ZBrush 2018的这一次更新,简直炸裂,新功能真是太好用了!2018版是ZBr ...
- css3背景渐变以及图片混合渲染模式(二)
http://avnpc.com/pages/photoshop-layer-blending-algorithm http://www.html5cn.org/forum.php?mod=viewt ...
- Win10内核驱动强制签名,申请沃通 EV代码签名证书
2016年7月,微软在MSDN宣布从Windows 10的1607版本开始,强制要求所有新的Win10 内核驱动程序,必须获得Windows硬件开发者中心仪表盘门户的数字签名才能在系统中运行.这项政策 ...
- UVA1583-Digit Generator(紫书例题3.5)
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When ...
- selenium chrome.options禁止加载图片和js
#新建一个选项卡 from selenium import webdriver options = webdriver.ChromeOptions() #禁止加载图片 prefs = { 'profi ...
- SVN提交代码时报405 Method Not Allowed
原因: 1.删除了某个文件夹,然后又创建了一个同名文件夹 2.之前执行过Add操作,但没上传代码,在电脑上提交了同路径的代码,再次上传时会报错 解决方法: 1. 删除出现错误的文件夹 2. SVN U ...