一, QDir dir;
1,dir.mkpath(“/opt/*****/****”); //创建路径,创建成功返回true,已经有此路径也返回true。
bool QDir::mkpath ( const QString & dirPath ) const //The function will create all parent directories necessary to create the directory.
2,输出调试信息的文件功能函数和行数
#define DEBUG qDebug( "File: %s, Func: %s, Line: %d", __FILE__, __FUNCTION__, __LINE__);
本文介绍了QDir::mkpath函数的使用方法,包括如何创建目录路径,并确保所有必要的父目录都已存在。此外,还提供了一个用于输出调试信息的宏定义,方便开发者在开发过程中快速定位问题。
1万+

被折叠的 条评论
为什么被折叠?



