• 5793阅读
  • 1回复

哪位高手知道如何获得本地某文件的创建时间? [复制链接]

上一主题 下一主题
离线309569029
 
只看楼主 正序阅读 楼主  发表于: 2009-07-28
我想得到一个文件的创建时间,如何用fileTime()来得到文件的时间,举个例子不胜感激!
离线shiroki

只看该作者 1楼 发表于: 2009-07-28
文档里有例子

QDateTime QFileInfo::created () const

Returns the date and time when the file was created.

On most Unix systems, this function returns the time of the last status change. A status change occurs when the file is created, but it also occurs whenever the user writes or sets inode information (for example, changing the file permissions).

If neither creation time nor "last status change" time are not available, returns the same as lastModified().

See also lastModified() and lastRead().
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
快速回复
限100 字节
 
上一个 下一个