Frost
Frost

Reputation: 3896

reading time stamp from files in Cocoa?

I want to read when a file is created (or last modified) as it showed in Finder "Date Modified."

Is there any existing method in Cocoa can do so? Thanks!

Upvotes: 1

Views: 858

Answers (2)

mipadi
mipadi

Reputation: 410662

If you're using 10.5 or later, you can use -[NSFileManager attributesOfItemAtPath:error:].

Upvotes: 3

KevinDTimm
KevinDTimm

Reputation: 14376

see 'man stat' or google 'struct stat'

Upvotes: 1

Related Questions