• 9544阅读
  • 2回复

如何判断一个文件或文件夹是否存在? [复制链接]

上一主题 下一主题
离线kning
 
只看楼主 倒序阅读 楼主  发表于: 2009-03-20
— 本帖被 XChinux 执行加亮操作(2009-03-20) —
如题:
如何判断一个文件或文件夹是否存在?

谢谢
只看该作者 1楼 发表于: 2009-03-20
bool QFileInfo::exists () const
Returns true if the file exists; otherwise returns false.

bool QFileInfo::isDir () const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise returns false.
离线kning
只看该作者 2楼 发表于: 2009-03-20
引用第1楼都市无名者于2009-03-20 13:04发表的  :
bool QFileInfo::exists () const
Returns true if the file exists; otherwise returns false.
bool QFileInfo::isDir () const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise returns false.


谢谢!
快速回复
限100 字节
 
上一个 下一个