当前位置:网站首页>Qt创建文件夹的两种方式区别
Qt创建文件夹的两种方式区别
2022-07-28 14:29:00 【飞天_】
QDir中两种创建文件夹的方式:
mkdir()如果要创建的文件夹里有子文件夹,那么这种是创建不成功的,除非子文件夹的父文件夹已经存在才可成功!
mkpath()如果创建的文件夹中有子文件夹,那么不管会从父文件夹一直创建到最底层的子文件夹的,都会成功的!
123/456
如果123已经存在,那么两种都会成功
如果123不存在,那么使用mkdir失败
QFileInfo中absolutefilepath()和absolutepath()有什么区别?
absolutefilepath()是包括当前文件的名字的
而absolutepath()是表示当前文件所在的路径,也就是不包括当前路径名字,只是到了上一层
qdir中的entryinfolist()函数如何过滤. 和.. 文件
dir. entryinfolist(QDir::Dirs|QDir::NoDotAndDotDot)这样就可以将这两个文件过滤掉了
如何将读出的文件流转成字符串?
QTextStream stream(&file);
QString str=stream. readall();
边栏推荐
- Celery related
- 代码比较干净的多商户商城系统
- Volatile principle
- Pytorch - sequential and modulelist
- 新版数据同步问题
- 2022年全球程序员平均薪资发布,中国排名很意外
- Publish raspberry pie web page with cpolar (apache2 installation test)
- 9、相关数据累积任务定义
- Requses template
- 配置cx-oracle 解决(cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: “Th
猜你喜欢
随机推荐
NFTScan 与 NFTPlay 在 NFT 数据领域达成战略合作
Classic Dijkstra and the longest way
Deepfacelab model parameters collection
2021-06-29
crmeb pro2.2即将增加的功能都有哪些?
Solve the problem of pycharm using PowerShell
机器学习的3大“疑难杂症”,因果学习是突破口 | 重庆大学刘礼
Data synchronization of new version
php parse_url绕过白名单
Jwy-32b voltage relay
Installing CONDA and configuring Jupiter
Volatile principle
JDS-12时间继电器
CANoe使用教程
Publish raspberry pie web page with cpolar (release of apache2 web page)
.net core version 2.2 cross domain configuration
【LeetCode】35、搜索插入位置
3511. Water pouring problem
Requses template
有奖活动分享:使用WordPress搭建一个专属自己的博客后最高可领取iPhone13








![[jspwiki]jspwiki installation deployment and configuration](/img/3c/81a201bb80dcbb17d1c97b1a5bb215.png)
