从可可文件中读取时间戳? [英] reading time stamp from files in Cocoa?
本文介绍了从可可文件中读取时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想读取一个文件创建(或上次修改),如Finder中显示的修改日期。
I want to read when a file is created (or last modified) as it showed in Finder "Date Modified."
Cocoa中是否有任何现有的方法可以这样做?谢谢!
Is there any existing method in Cocoa can do so? Thanks!
推荐答案
如果您使用的是10.5或更高版本,则可以使用 - [NSFileManager attributOfItemAtPath:error:]
。
If you're using 10.5 or later, you can use -[NSFileManager attributesOfItemAtPath:error:]
.
这篇关于从可可文件中读取时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文