QFile类的一些静态函数
1 bool QFile::exists ( const QString & fileName ) [static]
2 bool QFile::rename ( const QString & oldName, const QString & newName ) [static]
3 bool QFile::copy ( const QString & fileName, const QString & newName ) [static]
4 bool QFile::remove ( const QString & fileName ) [static]
5 bool QFile::link ( const QString & fileName, const QString & linkName ) [static]
6 QString QFile::symLinkTarget ( const QString & fileName ) [static]
Permissions QFile::permissions ( const QString & fileName ) [static]
void QFile::setDecodingFunction ( DecoderFn function ) [static]
void QFile::setEncodingFunction ( EncoderFn function ) [static]
这次先试下前6个,后面3个暂时pass
详细帮助请看官方帮助文档。
例1
包含文件
main.cpp
说明
很简单的函数调用,具体见注释
代码
QFile(1) - 几个静态函数
最新推荐文章于 2024-10-22 23:30:00 发布
本文介绍QFile类中六个静态函数的使用方法,并通过一个C++示例展示了如何使用这些函数来执行文件操作,包括检查文件是否存在、重命名、复制、删除文件,创建及移除快捷方式。
3425

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



